]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpProfile.c
PcAtChipsetPkg: Convert all .uni files to utf-8
[mirror_edk2.git] / PerformancePkg / Dp_App / DpProfile.c
index 880e057e7c63027f4f27394390292897f4f82afe..eb5b3ddfffcd75fbc9fdc1413e43ca3081477932 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-  Measured Profiling reporting for the Dp utility.\r
-  *\r
-  * Copyright (c) 2009-2010, 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
-  http://opensource.org/licenses/bsd-license.php\r
-  *\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Measured Profiling reporting for the Dp utility.\r
+\r
+  Copyright (c) 2009 - 2010, 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
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 **/\r
 \r
 #include <Library/BaseLib.h>\r
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
-/** Gather and print ALL Profiling Records.\r
-  *\r
-  * Displays all "interesting" Profile measurements in order.\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *         The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
-  *         They must not be in use by a calling function.\r
-  *\r
-  * @param[in]    Limit         The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print ALL Profiling Records.\r
+  \r
+  Displays all "interesting" Profile measurements in order.\r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+           The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
+           They must not be in use by a calling function.\r
+  \r
+  @param[in]    Limit         The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpAllProfile(\r
@@ -53,29 +54,35 @@ DumpAllProfile(
   )\r
 {\r
   EFI_STRING    StringPtr;\r
+  EFI_STRING    StringPtrUnknown;\r
 \r
+  StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);   \r
   StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_PROFILE), NULL);\r
+\r
   PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER),\r
-              (StringPtr == NULL) ? ALit_UNKNOWN: StringPtr);\r
+              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);\r
+  FreePool (StringPtr);\r
+  FreePool (StringPtrUnknown);\r
   return;\r
 }\r
 \r
-/** Gather and print Raw Profile Records.\r
-  *\r
-  * All Profile measurements with a duration greater than or equal to\r
-  * mInterestThreshold are printed without interpretation.\r
-  *\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *\r
-  * @param[in]    Limit         The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print Raw Profile Records.\r
+  \r
+  All Profile measurements with a duration greater than or equal to\r
+  mInterestThreshold are printed without interpretation.\r
+  \r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+  \r
+  @param[in]    Limit         The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpRawProfile(\r
@@ -84,9 +91,13 @@ DumpRawProfile(
   )\r
 {\r
   EFI_STRING    StringPtr;\r
+  EFI_STRING    StringPtrUnknown;\r
 \r
+  StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);   \r
   StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE), NULL);\r
   PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER),\r
-              (StringPtr == NULL) ? ALit_UNKNOWN: StringPtr);\r
+              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);\r
+  FreePool (StringPtr);\r
+  FreePool (StringPtrUnknown);\r
   return;\r
 }\r