public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [patch V2 3/3] ShellPkg/Dp: Make the help info align with code
Date: Tue, 12 Jun 2018 04:21:43 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E29608E@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20180611083206.106804-3-dandan.bi@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, June 11, 2018 4:32 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [patch V2 3/3] ShellPkg/Dp: Make the help info align with code
> 
> 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>
> ---
>  ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c      |  96 ++++++--------------
>  ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h      |   7 --
>  ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni    |   6 +-
>  ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf |   1 -
>  .../DpDynamicCommand/DpDynamicCommand.inf          |   1 -
>  .../DynamicCommand/DpDynamicCommand/DpInternal.h   |  48 ----------
>  .../DynamicCommand/DpDynamicCommand/DpProfile.c    | 100 ---------------------
>  7 files changed, 26 insertions(+), 233 deletions(-)
>  delete mode 100644 ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c
> 
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
> index d8451dbf59f..38766613175 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
> @@ -82,14 +82,10 @@ UINT32 const      NumCum = sizeof(CumData) / sizeof(PERF_CUM_DATA);
>  STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
>    {L"-v", TypeFlag},   // -v   Verbose Mode
>    {L"-A", TypeFlag},   // -A   All, Cooked
>    {L"-R", TypeFlag},   // -R   RAW All
>    {L"-s", TypeFlag},   // -s   Summary
> -#if PROFILING_IMPLEMENTED
> -  {L"-P", TypeFlag},   // -P   Dump Profile Data
> -  {L"-T", TypeFlag},   // -T   Dump Trace Data
> -#endif // PROFILING_IMPLEMENTED
>    {L"-x", TypeFlag},   // -x   eXclude Cumulative Items
>    {L"-i", TypeFlag},   // -i   Display Identifier
>    {L"-c", TypeValue},  // -c   Display cumulative data.
>    {L"-n", TypeValue},  // -n # Number of records to display for A and R
>    {L"-t", TypeValue},  // -t # Threshold of interest
> @@ -114,13 +110,10 @@ DumpStatistics( void )
>    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMINCOMPLETE), mDpHiiHandle, SummaryData.NumIncomplete);
>    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPHASES), mDpHiiHandle,     SummaryData.NumSummary);
>    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMHANDLES), mDpHiiHandle,    SummaryData.NumHandles,
> SummaryData.NumTrace - SummaryData.NumHandles);
>    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPEIMS), mDpHiiHandle,      SummaryData.NumPEIMs);
>    ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMGLOBALS), mDpHiiHandle,    SummaryData.NumGlobal);
> -#if PROFILING_IMPLEMENTED
> -  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_STATS_NUMPROFILE), mDpHiiHandle,    SummaryData.NumProfile);
> -#endif // PROFILING_IMPLEMENTED
>    SHELL_FREE_NON_NULL (StringPtr);
>    SHELL_FREE_NON_NULL (StringPtrUnknown);
>  }
> 
>  /**
> @@ -682,11 +675,10 @@ VOID
>  InitSummaryData (
>    VOID
>    )
>  {
>    SummaryData.NumTrace      = 0;
> -  SummaryData.NumProfile    = 0 ;
>    SummaryData.NumIncomplete = 0;
>    SummaryData.NumSummary    = 0;
>    SummaryData.NumHandles    = 0;
>    SummaryData.NumPEIMs      = 0;
>    SummaryData.NumGlobal     = 0;
> @@ -719,12 +711,10 @@ RunDp (
>    EFI_STRING                StringPtr;
>    BOOLEAN                   SummaryMode;
>    BOOLEAN                   VerboseMode;
>    BOOLEAN                   AllMode;
>    BOOLEAN                   RawMode;
> -  BOOLEAN                   TraceMode;
> -  BOOLEAN                   ProfileMode;
>    BOOLEAN                   ExcludeMode;
>    BOOLEAN                   CumulativeMode;
>    CONST CHAR16              *CustomCumulativeToken;
>    PERF_CUM_DATA             *CustomCumulativeData;
>    UINTN                     NameSize;
> @@ -734,12 +724,10 @@ RunDp (
>    StringPtr   = NULL;
>    SummaryMode = FALSE;
>    VerboseMode = FALSE;
>    AllMode     = FALSE;
>    RawMode     = FALSE;
> -  TraceMode   = FALSE;
> -  ProfileMode = FALSE;
>    ExcludeMode = FALSE;
>    CumulativeMode = FALSE;
>    CustomCumulativeData = NULL;
>    ShellStatus = SHELL_SUCCESS;
> 
> @@ -763,14 +751,10 @@ RunDp (
>    //
>    VerboseMode = ShellCommandLineGetFlag (ParamPackage, L"-v");
>    SummaryMode = (BOOLEAN) (ShellCommandLineGetFlag (ParamPackage, L"-S") || ShellCommandLineGetFlag (ParamPackage,
> L"-s"));
>    AllMode     = ShellCommandLineGetFlag (ParamPackage, L"-A");
>    RawMode     = ShellCommandLineGetFlag (ParamPackage, L"-R");
> -#if PROFILING_IMPLEMENTED
> -  TraceMode   = ShellCommandLineGetFlag (ParamPackage, L"-T");
> -  ProfileMode = ShellCommandLineGetFlag (ParamPackage, L"-P");
> -#endif  // PROFILING_IMPLEMENTED
>    ExcludeMode = ShellCommandLineGetFlag (ParamPackage, L"-x");
>    mShowId     = ShellCommandLineGetFlag (ParamPackage, L"-i");
>    CumulativeMode = ShellCommandLineGetFlag (ParamPackage, L"-c");
> 
>    // Options with Values
> @@ -789,18 +773,10 @@ RunDp (
>      mInterestThreshold = DEFAULT_THRESHOLD;  // 1ms := 1,000 us
>    } else {
>      mInterestThreshold = StrDecimalToUint64(CmdLineArg);
>    }
> 
> -  // Handle Flag combinations and default behaviors
> -  // If both TraceMode and ProfileMode are FALSE, set them both to TRUE
> -  if ((! TraceMode) && (! ProfileMode)) {
> -    TraceMode   = TRUE;
> -#if PROFILING_IMPLEMENTED
> -    ProfileMode = TRUE;
> -#endif  // PROFILING_IMPLEMENTED
> -  }
> 
>    //
>    // DP dump performance data by parsing FPDT table in ACPI table.
>    // Folloing 3 steps are to get the measurement form the FPDT table.
>    //
> @@ -917,71 +893,49 @@ RunDp (
>  ****    n Number2Display  Used by All and Raw mode.  Otherwise ignored.
>  ****    A All         --  R and S options are ignored
>  ****    R Raw         --  S option is ignored
>  ****    s Summary     --  Modifies "Cooked" output only
>  ****    Cooked (Default)
> -****
> -****  The All, Raw, and Cooked modes are modified by the Trace and Profile
> -****  options.
> -****    !T && !P  := (0) Default, Both are displayed
> -****     T && !P  := (1) Only Trace records are displayed
> -****    !T &&  P  := (2) Only Profile records are displayed
> -****     T &&  P  := (3) Same as Default, both are displayed
>  ****************************************************************************/
>    GatherStatistics (CustomCumulativeData);
>    if (CumulativeMode) {
>      ProcessCumulative (CustomCumulativeData);
>    } else if (AllMode) {
> -    if (TraceMode) {
> -      Status = DumpAllTrace( Number2Display, ExcludeMode);
> +    Status = DumpAllTrace( Number2Display, ExcludeMode);
> +    if (Status == EFI_ABORTED) {
> +      ShellStatus = SHELL_ABORTED;
> +      goto Done;
> +    }
> +  } else if (RawMode) {
> +    Status = DumpRawTrace( Number2Display, ExcludeMode);
> +    if (Status == EFI_ABORTED) {
> +      ShellStatus = SHELL_ABORTED;
> +      goto Done;
> +    }
> +  } else {
> +    //------------- Begin Cooked Mode Processing
> +    ProcessPhases ();
> +    if ( ! SummaryMode) {
> +      Status = ProcessHandles ( ExcludeMode);
>        if (Status == EFI_ABORTED) {
>          ShellStatus = SHELL_ABORTED;
>          goto Done;
>        }
> -    }
> -    if (ProfileMode) {
> -      DumpAllProfile( Number2Display, ExcludeMode);
> -    }
> -  } else if (RawMode) {
> -    if (TraceMode) {
> -      Status = DumpRawTrace( Number2Display, ExcludeMode);
> +
> +      Status = ProcessPeims ();
>        if (Status == EFI_ABORTED) {
>          ShellStatus = SHELL_ABORTED;
>          goto Done;
>        }
> -    }
> -    if (ProfileMode) {
> -      DumpRawProfile( Number2Display, ExcludeMode);
> -    }
> -  } else {
> -    //------------- Begin Cooked Mode Processing
> -    if (TraceMode) {
> -      ProcessPhases ();
> -      if ( ! SummaryMode) {
> -        Status = ProcessHandles ( ExcludeMode);
> -        if (Status == EFI_ABORTED) {
> -          ShellStatus = SHELL_ABORTED;
> -          goto Done;
> -        }
> -
> -        Status = ProcessPeims ();
> -        if (Status == EFI_ABORTED) {
> -          ShellStatus = SHELL_ABORTED;
> -          goto Done;
> -        }
> -
> -        Status = ProcessGlobal ();
> -        if (Status == EFI_ABORTED) {
> -          ShellStatus = SHELL_ABORTED;
> -          goto Done;
> -        }
> -
> -        ProcessCumulative (NULL);
> +
> +      Status = ProcessGlobal ();
> +      if (Status == EFI_ABORTED) {
> +        ShellStatus = SHELL_ABORTED;
> +        goto Done;
>        }
> -    }
> -    if (ProfileMode) {
> -      DumpAllProfile( Number2Display, ExcludeMode);
> +
> +       ProcessCumulative (NULL);
>      }
>    } //------------- End of Cooked Mode Processing
>    if ( VerboseMode || SummaryMode) {
>      DumpStatistics();
>    }
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h
> index 9fd88578720..aae021334d6 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.h
> @@ -51,16 +51,10 @@ extern EFI_HANDLE mDpHiiHandle;
>    * The value assigned to DP_DEBUG controls which debug output
>    * is generated.  Set it to ZERO to disable.
>  **/
>  #define DP_DEBUG                0
> 
> -/**
> -  * Set to 1 once Profiling has been implemented in order to enable
> -  * profiling related options and report output.
> -**/
> -#define PROFILING_IMPLEMENTED   0
> -
>  #define DEFAULT_THRESHOLD       1000    ///< One millisecond.
>  #define DEFAULT_DISPLAYCOUNT    50
>  #define MAXIMUM_DISPLAYCOUNT    999999  ///< Arbitrary maximum reasonable number.
> 
>  #define PERF_MAXDUR             0xFFFFFFFFFFFFFFFFULL
> @@ -95,11 +89,10 @@ typedef struct {
>    UINT32  Count;        ///< Total number of measurements accumulated.
>  } PERF_CUM_DATA;
> 
>  typedef struct {
>    UINT32                NumTrace;         ///< Number of recorded TRACE performance measurements.
> -  UINT32                NumProfile;       ///< Number of recorded PROFILE performance measurements.
>    UINT32                NumIncomplete;    ///< Number of measurements with no END value.
>    UINT32                NumSummary;       ///< Number of summary section measurements.
>    UINT32                NumHandles;       ///< Number of measurements with handles.
>    UINT32                NumPEIMs;         ///< Number of measurements of PEIMs.
>    UINT32                NumGlobal;        ///< Number of measurements with END value and NULL handle.
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
> index c7eb0fbd71e..ced8a487428 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
> @@ -70,19 +70,17 @@
>  #string STR_DP_STATS_NUMPHASES         #language en-US  "%,8d are major execution phases.\n"
>  #string STR_DP_STATS_NUMHANDLES        #language en-US  "%,8d have non-NULL handles, %d are NULL.\n"
>  #string STR_DP_STATS_NUMPEIMS          #language en-US  "%,8d are PEIMs.\n"
>  #string STR_DP_STATS_NUMGLOBALS        #language en-US  "%,8d are general measurements.\n"
>  #string STR_DP_STATS_NUMPROFILE        #language en-US  "%,8d are profiling records.\n"
> -#string STR_DP_SECTION_PROFILE         #language en-US  "Sequential Profile Records"
>  #string STR_DP_SECTION_ALL             #language en-US  "Sequential Trace Records"
>  #string STR_DP_ALL_HEADR               #language en-US  "\nIndex      Handle                 Module
> Token    Time(us)\n"
>  #string STR_DP_ALL_VARS                #language en-US  "%5d:%3s0x%08p %36s %13s %L8d\n"
>  #string STR_DP_ALL_DASHES2             #language en-US
> "-------------------------------------------------------------------------------------\n"
>  #string STR_DP_ALL_HEADR2              #language en-US  "\nIndex      Handle                 Module
> Token    Time(us)    ID\n"
>  #string STR_DP_ALL_VARS2               #language en-US  "%5d:%3s0x%08p %36s %13s %L8d %5d\n"
>  #string STR_DP_SECTION_RAWTRACE        #language en-US  "RAW Trace"
> -#string STR_DP_SECTION_RAWPROFILE      #language en-US  "RAW Profile"
>  #string STR_DP_RAW_DASHES              #language en-US
> "---------------------------------------------------------------------------------------------------------------------------\n"
>  #string STR_DP_RAW_VARS                #language en-US  "%5d: %16LX %16LX %16LX  %31a  %31a\n"
>  #string STR_DP_RAW_HEADR               #language en-US  "\nIndex       Handle        Start Count       End Count
> Token                          Module\n"
>  #string STR_DP_RAW_DASHES2             #language en-US
> "---------------------------------------------------------------------------------------------------------------------------------\n"
>  #string STR_DP_RAW_VARS2               #language en-US  "%5d: %16LX %16LX %16LX  %31a  %31a %5d\n"
> @@ -96,21 +94,19 @@
>  #string STR_GET_HELP_DP         #language en-US ""
>  ".TH dp 0 "Display performance metrics"\r\n"
>  ".SH NAME\r\n"
>  "Displays performance metrics that are stored in memory.\r\n"
>  ".SH SYNOPSIS\r\n"
> -"DP [-b] [-v] [-x] [-s | -A | -R] [-T] [-P] [-t value] [-n count] [-c [token]][-i] [-h | -?]\r\n"
> +"DP [-b] [-v] [-x] [-s | -A | -R] [-t value] [-n count] [-c [token]][-i] [-?]\r\n"
>  ".SH OPTIONS\r\n"
>  " \r\n"
>  "  -b       - Displays on multiple pages\r\n"
>  "  -v       - Displays additional information\r\n"
>  "  -x       - Prevents display of individual measurements for cumulative items\r\n"
>  "  -s       - Displays summary information only\r\n"
>  "  -A       - Displays all measurements in a list\r\n"
>  "  -R       - Displays all measurements in raw format\r\n"
> -"  -T       - Displays trace measurements only\r\n"
> -"  -P       - Displays profile measurements only\r\n"
>  "  -t VALUE - Sets display threshold to VALUE microseconds\r\n"
>  "  -n COUNT - Limits display to COUNT lines in All and Raw modes\r\n"
>  "  -i       - Displays identifier\r\n"
>  "  -c TOKEN - Display pre-defined and custom cumulative data\r\n"
>  "             Pre-defined cumulative token are:\r\n"
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
> b/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
> index 54fe0017541..cedb333b285 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf
> @@ -31,11 +31,10 @@
>    Literals.h
>    Literals.c
>    DpInternal.h
>    DpUtilities.c
>    DpTrace.c
> -  DpProfile.c
>    DpApp.c
> 
>  [Packages]
>    MdePkg/MdePkg.dec
>    ShellPkg/ShellPkg.dec
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
> b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
> index e906870bd5e..8fd3bbd5df8 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
> @@ -32,11 +32,10 @@
>    Literals.h
>    Literals.c
>    DpInternal.h
>    DpUtilities.c
>    DpTrace.c
> -  DpProfile.c
>    DpDynamicCommand.c
> 
>  [Packages]
>    MdePkg/MdePkg.dec
>    ShellPkg/ShellPkg.dec
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
> b/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
> index eedc377cded..8dd3076cc71 100644
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
> +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
> @@ -302,54 +302,6 @@ ProcessGlobal(
>  VOID
>  ProcessCumulative(
>    IN PERF_CUM_DATA                  *CustomCumulativeData OPTIONAL
>    );
> 
> -/**
> -  Gather and print ALL Profiling Records.
> -
> -  Displays all "interesting" Profile measurements in order.
> -  The number of records displayed is controlled by:
> -     - records with a duration less than mInterestThreshold microseconds are not displayed.
> -     - No more than Limit records are displayed.  A Limit of zero will not limit the output.
> -     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
> -       displayed.
> -
> -  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.
> -           The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.
> -           They must not be in use by a calling function.
> -
> -  @param[in]    Limit         The number of records to print.  Zero is ALL.
> -  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.
> -
> -**/
> -VOID
> -DumpAllProfile(
> -  IN UINTN          Limit,
> -  IN BOOLEAN        ExcludeFlag
> -  );
> -
> -/**
> -  Gather and print Raw Profile Records.
> -
> -  All Profile measurements with a duration greater than or equal to
> -  mInterestThreshold are printed without interpretation.
> -
> -  The number of records displayed is controlled by:
> -     - records with a duration less than mInterestThreshold microseconds are not displayed.
> -     - No more than Limit records are displayed.  A Limit of zero will not limit the output.
> -     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
> -       displayed.
> -
> -  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.
> -
> -  @param[in]    Limit         The number of records to print.  Zero is ALL.
> -  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.
> -
> -**/
> -VOID
> -DumpRawProfile(
> -  IN UINTN          Limit,
> -  IN BOOLEAN        ExcludeFlag
> -  );
> -
>  #endif
> diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c
> b/ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c
> deleted file mode 100644
> index af25217daef..00000000000
> --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpProfile.c
> +++ /dev/null
> @@ -1,100 +0,0 @@
> -/** @file
> -  Measured Profiling reporting for the Dp utility.
> -
> -  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
> -  This program and the accompanying materials
> -  are licensed and made available under the terms and conditions of the BSD License
> -  which accompanies this distribution.  The full text of the license may be found at
> -  http://opensource.org/licenses/bsd-license.php
> -
> -  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> -  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> -**/
> -
> -#include <Library/BaseLib.h>
> -#include <Library/BaseMemoryLib.h>
> -#include <Library/MemoryAllocationLib.h>
> -#include <Library/DebugLib.h>
> -#include <Library/UefiBootServicesTableLib.h>
> -#include <Library/PeCoffGetEntryPointLib.h>
> -#include <Library/PerformanceLib.h>
> -#include <Library/PrintLib.h>
> -#include <Library/HiiLib.h>
> -#include <Library/PcdLib.h>
> -
> -#include <Guid/Performance.h>
> -
> -#include "Dp.h"
> -#include "Literals.h"
> -#include "DpInternal.h"
> -
> -/**
> -  Gather and print ALL Profiling Records.
> -
> -  Displays all "interesting" Profile measurements in order.
> -  The number of records displayed is controlled by:
> -     - records with a duration less than mInterestThreshold microseconds are not displayed.
> -     - No more than Limit records are displayed.  A Limit of zero will not limit the output.
> -     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
> -       displayed.
> -
> -  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.
> -           The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.
> -           They must not be in use by a calling function.
> -
> -  @param[in]    Limit         The number of records to print.  Zero is ALL.
> -  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.
> -
> -**/
> -VOID
> -DumpAllProfile(
> -  IN UINTN      Limit,
> -  IN BOOLEAN    ExcludeFlag
> -  )
> -{
> -  EFI_STRING    StringPtr;
> -  EFI_STRING    StringPtrUnknown;
> -
> -  StringPtrUnknown = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);
> -  StringPtr = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_PROFILE), NULL);
> -
> -  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), mDpHiiHandle,
> -              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);
> -  FreePool (StringPtr);
> -  FreePool (StringPtrUnknown);
> -}
> -
> -/**
> -  Gather and print Raw Profile Records.
> -
> -  All Profile measurements with a duration greater than or equal to
> -  mInterestThreshold are printed without interpretation.
> -
> -  The number of records displayed is controlled by:
> -     - records with a duration less than mInterestThreshold microseconds are not displayed.
> -     - No more than Limit records are displayed.  A Limit of zero will not limit the output.
> -     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
> -       displayed.
> -
> -  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.
> -
> -  @param[in]    Limit         The number of records to print.  Zero is ALL.
> -  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.
> -
> -**/
> -VOID
> -DumpRawProfile(
> -  IN UINTN      Limit,
> -  IN BOOLEAN    ExcludeFlag
> -  )
> -{
> -  EFI_STRING    StringPtr;
> -  EFI_STRING    StringPtrUnknown;
> -
> -  StringPtrUnknown = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);
> -  StringPtr = HiiGetString (mDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE), NULL);
> -  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), mDpHiiHandle,
> -              (StringPtr == NULL) ? StringPtrUnknown: StringPtr);
> -  FreePool (StringPtr);
> -  FreePool (StringPtrUnknown);
> -}
> --
> 2.14.3.windows.1



      reply	other threads:[~2018-06-12  4:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  8:32 [patch V2 1/3] ShellPkg/Dp: make sure memory is freed before exit Dandan Bi
2018-06-11  8:32 ` [patch V2 2/3] ShellPkg/Dp: Initialize summary date when run DP Dandan Bi
2018-06-12  8:10   ` Ni, Ruiyu
2018-06-11  8:32 ` [patch V2 3/3] ShellPkg/Dp: Make the help info align with code Dandan Bi
2018-06-12  4:21   ` Gao, Liming [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E29608E@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox