]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpInternal.h
Update DP to get Image name with the following methods orderly.
[mirror_edk2.git] / PerformancePkg / Dp_App / DpInternal.h
index d2454060bcbd8ddb5835a752c1e79f9d08636954..a8630c2621b19518f7395c0c590d5f4e53aa9cbd 100644 (file)
@@ -6,7 +6,7 @@
   * Dp application.  In addition to global data, function declarations for\r
   * DpUtilities.c, DpTrace.c, and DpProfile.c are included here.\r
   *\r
-  * Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  * Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
   * This program and the accompanying materials\r
   * are licensed and made available under the terms and conditions of the BSD License\r
   * which accompanies this distribution.  The full text of the license may be found at\r
 **/\r
 #ifndef _DP_INTELNAL_H_\r
 #define _DP_INTELNAL_H_\r
+\r
+#define DP_GAUGE_STRING_LENGTH   36\r
+\r
 //\r
 /// Module-Global Variables\r
 ///@{\r
 extern EFI_HII_HANDLE     gHiiHandle;\r
 extern CHAR16             *mPrintTokenBuffer;\r
-extern CHAR16             mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
-extern CHAR16             mUnicodeToken[PERF_TOKEN_LENGTH + 1];\r
+extern CHAR16             mGaugeString[DP_GAUGE_STRING_LENGTH + 1];\r
+extern CHAR16             mUnicodeToken[DXE_PERFORMANCE_STRING_SIZE];\r
 extern UINT64             mInterestThreshold;\r
 \r
 extern PERF_SUMMARY_DATA  SummaryData;    ///< Create the SummaryData structure and init. to ZERO.\r
@@ -100,6 +103,13 @@ GetShortPdbFileName (
 \r
 /** \r
   Get a human readable name for an image handle.\r
+  The following methods will be tried orderly:\r
+    1. Image PDB\r
+    2. ComponentName2 protocol\r
+    3. FFS UI section\r
+    4. Image GUID\r
+    5. Image DevicePath\r
+    6. Unknown Driver Name\r
   \r
   @param[in]    Handle\r
   \r
@@ -341,4 +351,16 @@ DumpRawProfile(
   IN UINTN          Limit,\r
   IN BOOLEAN        ExcludeFlag\r
   );\r
+\r
+/**\r
+  Wrap original FreePool to check NULL pointer first.\r
+\r
+  @param[in]    Buffer      The pointer to the buffer to free.\r
+\r
+**/\r
+VOID\r
+SafeFreePool (\r
+  IN VOID   *Buffer\r
+  );\r
+\r
 #endif\r