]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/Dp: Make the help info align with code
authorDandan Bi <dandan.bi@intel.com>
Sat, 12 May 2018 13:00:23 +0000 (21:00 +0800)
committerEric Dong <eric.dong@intel.com>
Tue, 12 Jun 2018 07:50:55 +0000 (15:50 +0800)
Currently in DP, the Trace mode is enabled by default.
And the profile mode is not implemented. but the help info
of DP tool doesn't match current implementation. Which will
make user confused. So now remove the unused source code
related to the profile mode and update the help information
of DP tool.

V2: Remove the unused code related to profile mode.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h
ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c [deleted file]

index d8451dbf59fa9f78160ca9ee540f60b112b37093..38766613175510209794ecae049cb490316c30a0 100644 (file)
@@ -84,10 +84,6 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
   {L"-A", TypeFlag},   // -A   All, Cooked\r
   {L"-R", TypeFlag},   // -R   RAW All\r
   {L"-s", TypeFlag},   // -s   Summary\r
   {L"-A", TypeFlag},   // -A   All, Cooked\r
   {L"-R", TypeFlag},   // -R   RAW All\r
   {L"-s", TypeFlag},   // -s   Summary\r
-#if PROFILING_IMPLEMENTED\r
-  {L"-P", TypeFlag},   // -P   Dump Profile Data\r
-  {L"-T", TypeFlag},   // -T   Dump Trace Data\r
-#endif // PROFILING_IMPLEMENTED\r
   {L"-x", TypeFlag},   // -x   eXclude Cumulative Items\r
   {L"-i", TypeFlag},   // -i   Display Identifier\r
   {L"-c", TypeValue},  // -c   Display cumulative data.\r
   {L"-x", TypeFlag},   // -x   eXclude Cumulative Items\r
   {L"-i", TypeFlag},   // -i   Display Identifier\r
   {L"-c", TypeValue},  // -c   Display cumulative data.\r
@@ -116,9 +112,6 @@ DumpStatistics( void )
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMHANDLES), mDpHiiHandle,    SummaryData.NumHandles, SummaryData.NumTrace - SummaryData.NumHandles);\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPEIMS), mDpHiiHandle,      SummaryData.NumPEIMs);\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMGLOBALS), mDpHiiHandle,    SummaryData.NumGlobal);\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMHANDLES), mDpHiiHandle,    SummaryData.NumHandles, SummaryData.NumTrace - SummaryData.NumHandles);\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPEIMS), mDpHiiHandle,      SummaryData.NumPEIMs);\r
   ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMGLOBALS), mDpHiiHandle,    SummaryData.NumGlobal);\r
-#if PROFILING_IMPLEMENTED\r
-  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPROFILE), mDpHiiHandle,    SummaryData.NumProfile);\r
-#endif // PROFILING_IMPLEMENTED\r
   SHELL_FREE_NON_NULL (StringPtr);\r
   SHELL_FREE_NON_NULL (StringPtrUnknown);\r
 }\r
   SHELL_FREE_NON_NULL (StringPtr);\r
   SHELL_FREE_NON_NULL (StringPtrUnknown);\r
 }\r
@@ -684,7 +677,6 @@ InitSummaryData (
   )\r
 {\r
   SummaryData.NumTrace      = 0;\r
   )\r
 {\r
   SummaryData.NumTrace      = 0;\r
-  SummaryData.NumProfile    = 0 ;\r
   SummaryData.NumIncomplete = 0;\r
   SummaryData.NumSummary    = 0;\r
   SummaryData.NumHandles    = 0;\r
   SummaryData.NumIncomplete = 0;\r
   SummaryData.NumSummary    = 0;\r
   SummaryData.NumHandles    = 0;\r
@@ -721,8 +713,6 @@ RunDp (
   BOOLEAN                   VerboseMode;\r
   BOOLEAN                   AllMode;\r
   BOOLEAN                   RawMode;\r
   BOOLEAN                   VerboseMode;\r
   BOOLEAN                   AllMode;\r
   BOOLEAN                   RawMode;\r
-  BOOLEAN                   TraceMode;\r
-  BOOLEAN                   ProfileMode;\r
   BOOLEAN                   ExcludeMode;\r
   BOOLEAN                   CumulativeMode;\r
   CONST CHAR16              *CustomCumulativeToken;\r
   BOOLEAN                   ExcludeMode;\r
   BOOLEAN                   CumulativeMode;\r
   CONST CHAR16              *CustomCumulativeToken;\r
@@ -736,8 +726,6 @@ RunDp (
   VerboseMode = FALSE;\r
   AllMode     = FALSE;\r
   RawMode     = FALSE;\r
   VerboseMode = FALSE;\r
   AllMode     = FALSE;\r
   RawMode     = FALSE;\r
-  TraceMode   = FALSE;\r
-  ProfileMode = FALSE;\r
   ExcludeMode = FALSE;\r
   CumulativeMode = FALSE;\r
   CustomCumulativeData = NULL;\r
   ExcludeMode = FALSE;\r
   CumulativeMode = FALSE;\r
   CustomCumulativeData = NULL;\r
@@ -765,10 +753,6 @@ RunDp (
   SummaryMode = (BOOLEAN) (ShellCommandLineGetFlag (ParamPackage, L"-S") || ShellCommandLineGetFlag (ParamPackage, L"-s"));\r
   AllMode     = ShellCommandLineGetFlag (ParamPackage, L"-A");\r
   RawMode     = ShellCommandLineGetFlag (ParamPackage, L"-R");\r
   SummaryMode = (BOOLEAN) (ShellCommandLineGetFlag (ParamPackage, L"-S") || ShellCommandLineGetFlag (ParamPackage, L"-s"));\r
   AllMode     = ShellCommandLineGetFlag (ParamPackage, L"-A");\r
   RawMode     = ShellCommandLineGetFlag (ParamPackage, L"-R");\r
-#if PROFILING_IMPLEMENTED\r
-  TraceMode   = ShellCommandLineGetFlag (ParamPackage, L"-T");\r
-  ProfileMode = ShellCommandLineGetFlag (ParamPackage, L"-P");\r
-#endif  // PROFILING_IMPLEMENTED\r
   ExcludeMode = ShellCommandLineGetFlag (ParamPackage, L"-x");\r
   mShowId     = ShellCommandLineGetFlag (ParamPackage, L"-i");\r
   CumulativeMode = ShellCommandLineGetFlag (ParamPackage, L"-c");\r
   ExcludeMode = ShellCommandLineGetFlag (ParamPackage, L"-x");\r
   mShowId     = ShellCommandLineGetFlag (ParamPackage, L"-i");\r
   CumulativeMode = ShellCommandLineGetFlag (ParamPackage, L"-c");\r
@@ -791,14 +775,6 @@ RunDp (
     mInterestThreshold = StrDecimalToUint64(CmdLineArg);\r
   }\r
 \r
     mInterestThreshold = StrDecimalToUint64(CmdLineArg);\r
   }\r
 \r
-  // Handle Flag combinations and default behaviors\r
-  // If both TraceMode and ProfileMode are FALSE, set them both to TRUE\r
-  if ((! TraceMode) && (! ProfileMode)) {\r
-    TraceMode   = TRUE;\r
-#if PROFILING_IMPLEMENTED\r
-    ProfileMode = TRUE;\r
-#endif  // PROFILING_IMPLEMENTED\r
-  }\r
 \r
   //\r
   // DP dump performance data by parsing FPDT table in ACPI table.\r
 \r
   //\r
   // DP dump performance data by parsing FPDT table in ACPI table.\r
@@ -919,67 +895,45 @@ RunDp (
 ****    R Raw         --  S option is ignored\r
 ****    s Summary     --  Modifies "Cooked" output only\r
 ****    Cooked (Default)\r
 ****    R Raw         --  S option is ignored\r
 ****    s Summary     --  Modifies "Cooked" output only\r
 ****    Cooked (Default)\r
-****\r
-****  The All, Raw, and Cooked modes are modified by the Trace and Profile\r
-****  options.\r
-****    !T && !P  := (0) Default, Both are displayed\r
-****     T && !P  := (1) Only Trace records are displayed\r
-****    !T &&  P  := (2) Only Profile records are displayed\r
-****     T &&  P  := (3) Same as Default, both are displayed\r
 ****************************************************************************/\r
   GatherStatistics (CustomCumulativeData);\r
   if (CumulativeMode) {                       \r
     ProcessCumulative (CustomCumulativeData);\r
   } else if (AllMode) {\r
 ****************************************************************************/\r
   GatherStatistics (CustomCumulativeData);\r
   if (CumulativeMode) {                       \r
     ProcessCumulative (CustomCumulativeData);\r
   } else if (AllMode) {\r
-    if (TraceMode) {\r
-      Status = DumpAllTrace( Number2Display, ExcludeMode);\r
+    Status = DumpAllTrace( Number2Display, ExcludeMode);\r
+    if (Status == EFI_ABORTED) {\r
+      ShellStatus = SHELL_ABORTED;\r
+      goto Done;\r
+    }\r
+  } else if (RawMode) {\r
+    Status = DumpRawTrace( Number2Display, ExcludeMode);\r
+    if (Status == EFI_ABORTED) {\r
+      ShellStatus = SHELL_ABORTED;\r
+      goto Done;\r
+    }\r
+  } else {\r
+    //------------- Begin Cooked Mode Processing\r
+    ProcessPhases ();\r
+    if ( ! SummaryMode) {\r
+      Status = ProcessHandles ( ExcludeMode);\r
       if (Status == EFI_ABORTED) {\r
         ShellStatus = SHELL_ABORTED;\r
         goto Done;\r
       }\r
       if (Status == EFI_ABORTED) {\r
         ShellStatus = SHELL_ABORTED;\r
         goto Done;\r
       }\r
-    }\r
-    if (ProfileMode) {\r
-      DumpAllProfile( Number2Display, ExcludeMode);\r
-    }\r
-  } else if (RawMode) {\r
-    if (TraceMode) {\r
-      Status = DumpRawTrace( Number2Display, ExcludeMode);\r
+\r
+      Status = ProcessPeims ();\r
       if (Status == EFI_ABORTED) {\r
         ShellStatus = SHELL_ABORTED;\r
         goto Done;\r
       }\r
       if (Status == EFI_ABORTED) {\r
         ShellStatus = SHELL_ABORTED;\r
         goto Done;\r
       }\r
-    }\r
-    if (ProfileMode) {\r
-      DumpRawProfile( Number2Display, ExcludeMode);\r
-    }\r
-  } else {\r
-    //------------- Begin Cooked Mode Processing\r
-    if (TraceMode) {\r
-      ProcessPhases ();\r
-      if ( ! SummaryMode) {\r
-        Status = ProcessHandles ( ExcludeMode);\r
-        if (Status == EFI_ABORTED) {\r
-          ShellStatus = SHELL_ABORTED;\r
-          goto Done;\r
-        }\r
-\r
-        Status = ProcessPeims ();\r
-        if (Status == EFI_ABORTED) {\r
-          ShellStatus = SHELL_ABORTED;\r
-          goto Done;\r
-        }\r
-\r
-        Status = ProcessGlobal ();\r
-        if (Status == EFI_ABORTED) {\r
-          ShellStatus = SHELL_ABORTED;\r
-          goto Done;\r
-        }\r
-\r
-        ProcessCumulative (NULL);\r
+\r
+      Status = ProcessGlobal ();\r
+      if (Status == EFI_ABORTED) {\r
+        ShellStatus = SHELL_ABORTED;\r
+        goto Done;\r
       }\r
       }\r
-    }\r
-    if (ProfileMode) {\r
-      DumpAllProfile( Number2Display, ExcludeMode);\r
+\r
+       ProcessCumulative (NULL);\r
     }\r
   } //------------- End of Cooked Mode Processing\r
   if ( VerboseMode || SummaryMode) {\r
     }\r
   } //------------- End of Cooked Mode Processing\r
   if ( VerboseMode || SummaryMode) {\r
index 9fd88578720b89c3c358fd1841206d38e5b9bfd2..aae021334d67c6808044c430df2b4ae6f67bb19b 100644 (file)
@@ -53,12 +53,6 @@ extern EFI_HANDLE mDpHiiHandle;
 **/\r
 #define DP_DEBUG                0\r
 \r
 **/\r
 #define DP_DEBUG                0\r
 \r
-/**\r
-  * Set to 1 once Profiling has been implemented in order to enable\r
-  * profiling related options and report output.\r
-**/\r
-#define PROFILING_IMPLEMENTED   0\r
-\r
 #define DEFAULT_THRESHOLD       1000    ///< One millisecond.\r
 #define DEFAULT_DISPLAYCOUNT    50\r
 #define MAXIMUM_DISPLAYCOUNT    999999  ///< Arbitrary maximum reasonable number.\r
 #define DEFAULT_THRESHOLD       1000    ///< One millisecond.\r
 #define DEFAULT_DISPLAYCOUNT    50\r
 #define MAXIMUM_DISPLAYCOUNT    999999  ///< Arbitrary maximum reasonable number.\r
@@ -97,7 +91,6 @@ typedef struct {
 \r
 typedef struct {\r
   UINT32                NumTrace;         ///< Number of recorded TRACE performance measurements.\r
 \r
 typedef struct {\r
   UINT32                NumTrace;         ///< Number of recorded TRACE performance measurements.\r
-  UINT32                NumProfile;       ///< Number of recorded PROFILE performance measurements.\r
   UINT32                NumIncomplete;    ///< Number of measurements with no END value.\r
   UINT32                NumSummary;       ///< Number of summary section measurements.\r
   UINT32                NumHandles;       ///< Number of measurements with handles.\r
   UINT32                NumIncomplete;    ///< Number of measurements with no END value.\r
   UINT32                NumSummary;       ///< Number of summary section measurements.\r
   UINT32                NumHandles;       ///< Number of measurements with handles.\r
index c7eb0fbd71e3194f6a0e06d266f56121d42ad1fd..ced8a487428504ce16b18617c7b948f7f2d681ed 100644 (file)
@@ -72,7 +72,6 @@
 #string STR_DP_STATS_NUMPEIMS          #language en-US  "%,8d are PEIMs.\n"\r
 #string STR_DP_STATS_NUMGLOBALS        #language en-US  "%,8d are general measurements.\n"\r
 #string STR_DP_STATS_NUMPROFILE        #language en-US  "%,8d are profiling records.\n"\r
 #string STR_DP_STATS_NUMPEIMS          #language en-US  "%,8d are PEIMs.\n"\r
 #string STR_DP_STATS_NUMGLOBALS        #language en-US  "%,8d are general measurements.\n"\r
 #string STR_DP_STATS_NUMPROFILE        #language en-US  "%,8d are profiling records.\n"\r
-#string STR_DP_SECTION_PROFILE         #language en-US  "Sequential Profile Records"\r
 #string STR_DP_SECTION_ALL             #language en-US  "Sequential Trace Records"\r
 #string STR_DP_ALL_HEADR               #language en-US  "\nIndex      Handle                 Module                      Token    Time(us)\n"\r
 #string STR_DP_ALL_VARS                #language en-US  "%5d:%3s0x%08p %36s %13s %L8d\n"\r
 #string STR_DP_SECTION_ALL             #language en-US  "Sequential Trace Records"\r
 #string STR_DP_ALL_HEADR               #language en-US  "\nIndex      Handle                 Module                      Token    Time(us)\n"\r
 #string STR_DP_ALL_VARS                #language en-US  "%5d:%3s0x%08p %36s %13s %L8d\n"\r
@@ -80,7 +79,6 @@
 #string STR_DP_ALL_HEADR2              #language en-US  "\nIndex      Handle                 Module                      Token    Time(us)    ID\n"\r
 #string STR_DP_ALL_VARS2               #language en-US  "%5d:%3s0x%08p %36s %13s %L8d %5d\n"\r
 #string STR_DP_SECTION_RAWTRACE        #language en-US  "RAW Trace"\r
 #string STR_DP_ALL_HEADR2              #language en-US  "\nIndex      Handle                 Module                      Token    Time(us)    ID\n"\r
 #string STR_DP_ALL_VARS2               #language en-US  "%5d:%3s0x%08p %36s %13s %L8d %5d\n"\r
 #string STR_DP_SECTION_RAWTRACE        #language en-US  "RAW Trace"\r
-#string STR_DP_SECTION_RAWPROFILE      #language en-US  "RAW Profile"\r
 #string STR_DP_RAW_DASHES              #language en-US  "---------------------------------------------------------------------------------------------------------------------------\n"\r
 #string STR_DP_RAW_VARS                #language en-US  "%5d: %16LX %16LX %16LX  %31a  %31a\n"\r
 #string STR_DP_RAW_HEADR               #language en-US  "\nIndex       Handle        Start Count       End Count                  Token                          Module\n"\r
 #string STR_DP_RAW_DASHES              #language en-US  "---------------------------------------------------------------------------------------------------------------------------\n"\r
 #string STR_DP_RAW_VARS                #language en-US  "%5d: %16LX %16LX %16LX  %31a  %31a\n"\r
 #string STR_DP_RAW_HEADR               #language en-US  "\nIndex       Handle        Start Count       End Count                  Token                          Module\n"\r
@@ -98,7 +96,7 @@
 ".SH NAME\r\n"\r
 "Displays performance metrics that are stored in memory.\r\n"\r
 ".SH SYNOPSIS\r\n"\r
 ".SH NAME\r\n"\r
 "Displays performance metrics that are stored in memory.\r\n"\r
 ".SH SYNOPSIS\r\n"\r
-"DP [-b] [-v] [-x] [-s | -A | -R] [-T] [-P] [-t value] [-n count] [-c [token]][-i] [-h | -?]\r\n"\r
+"DP [-b] [-v] [-x] [-s | -A | -R] [-t value] [-n count] [-c [token]][-i] [-?]\r\n"\r
 ".SH OPTIONS\r\n"\r
 " \r\n"\r
 "  -b       - Displays on multiple pages\r\n"\r
 ".SH OPTIONS\r\n"\r
 " \r\n"\r
 "  -b       - Displays on multiple pages\r\n"\r
 "  -s       - Displays summary information only\r\n"\r
 "  -A       - Displays all measurements in a list\r\n"\r
 "  -R       - Displays all measurements in raw format\r\n"\r
 "  -s       - Displays summary information only\r\n"\r
 "  -A       - Displays all measurements in a list\r\n"\r
 "  -R       - Displays all measurements in raw format\r\n"\r
-"  -T       - Displays trace measurements only\r\n"\r
-"  -P       - Displays profile measurements only\r\n"\r
 "  -t VALUE - Sets display threshold to VALUE microseconds\r\n"\r
 "  -n COUNT - Limits display to COUNT lines in All and Raw modes\r\n"\r
 "  -i       - Displays identifier\r\n"\r
 "  -t VALUE - Sets display threshold to VALUE microseconds\r\n"\r
 "  -n COUNT - Limits display to COUNT lines in All and Raw modes\r\n"\r
 "  -i       - Displays identifier\r\n"\r
index 54fe0017541087e0011089822a817e637dc5bb1b..cedb333b285c380aef8d1a51648f2e3713e20d7a 100644 (file)
@@ -33,7 +33,6 @@
   DpInternal.h\r
   DpUtilities.c\r
   DpTrace.c\r
   DpInternal.h\r
   DpUtilities.c\r
   DpTrace.c\r
-  DpProfile.c\r
   DpApp.c\r
 \r
 [Packages]\r
   DpApp.c\r
 \r
 [Packages]\r
index e906870bd5e103ab76ccb9e35ad4275a36026044..8fd3bbd5df83e9d8792cfea13a531a554763d5b2 100644 (file)
@@ -34,7 +34,6 @@
   DpInternal.h\r
   DpUtilities.c\r
   DpTrace.c\r
   DpInternal.h\r
   DpUtilities.c\r
   DpTrace.c\r
-  DpProfile.c\r
   DpDynamicCommand.c\r
 \r
 [Packages]\r
   DpDynamicCommand.c\r
 \r
 [Packages]\r
index eedc377cded0ec53e27534d9b4d1daeae6c40997..8dd3076cc719e547a277974c6a02854cbb6443fc 100644 (file)
@@ -304,52 +304,4 @@ ProcessCumulative(
   IN PERF_CUM_DATA                  *CustomCumulativeData OPTIONAL\r
   );\r
 \r
   IN PERF_CUM_DATA                  *CustomCumulativeData OPTIONAL\r
   );\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
-  IN UINTN          Limit,\r
-  IN BOOLEAN        ExcludeFlag\r
-  );\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
-  IN UINTN          Limit,\r
-  IN BOOLEAN        ExcludeFlag\r
-  );\r
-\r
 #endif\r
 #endif\r
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c b/ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c
deleted file mode 100644 (file)
index af25217..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/** @file\r
-  Measured Profiling reporting for the Dp utility.\r
-\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.\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 <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/PeCoffGetEntryPointLib.h>\r
-#include <Library/PerformanceLib.h>\r
-#include <Library/PrintLib.h>\r
-#include <Library/HiiLib.h>\r
-#include <Library/PcdLib.h>\r
-\r
-#include <Guid/Performance.h>\r
-\r
-#include "Dp.h"\r
-#include "Literals.h"\r
-#include "DpInternal.h"\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
-  IN UINTN      Limit,\r
-  IN BOOLEAN    ExcludeFlag\r
-  )\r
-{\r
-  EFI_STRING    StringPtr;\r
-  EFI_STRING    StringPtrUnknown;\r
-\r
-  StringPtrUnknown = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);\r
-  StringPtr = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_PROFILE), NULL);\r
-\r
-  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), mDpHiiHandle,\r
-              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);\r
-  FreePool (StringPtr);\r
-  FreePool (StringPtrUnknown);\r
-}\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
-  IN UINTN      Limit,\r
-  IN BOOLEAN    ExcludeFlag\r
-  )\r
-{\r
-  EFI_STRING    StringPtr;\r
-  EFI_STRING    StringPtrUnknown;\r
-\r
-  StringPtrUnknown = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);\r
-  StringPtr = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE), NULL);\r
-  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), mDpHiiHandle,\r
-              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);\r
-  FreePool (StringPtr);\r
-  FreePool (StringPtrUnknown);\r
-}\r