/** @file\r
- * Shell application for Displaying Performance Metrics.\r
- *\r
- * The Dp application reads performance data and presents it in several\r
- * different formats depending upon the needs of the user. Both\r
- * Trace and Measured Profiling information is processed and presented.\r
- *\r
- * Dp uses the "PerformanceLib" to read the measurement records.\r
- * The "TimerLib" provides information about the timer, such as frequency,\r
- * beginning, and ending counter values.\r
- * Measurement records contain identifying information (Handle, Token, Module)\r
- * and start and end time values.\r
- * Dp uses this information to group records in different ways. It also uses\r
- * timer information to calculate elapsed time for each measurement.\r
- *\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
- * 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
+ Shell application for Displaying Performance Metrics.\r
+\r
+ The Dp application reads performance data and presents it in several\r
+ different formats depending upon the needs of the user. Both\r
+ Trace and Measured Profiling information is processed and presented.\r
+\r
+ Dp uses the "PerformanceLib" to read the measurement records.\r
+ The "TimerLib" provides information about the timer, such as frequency,\r
+ beginning, and ending counter values.\r
+ Measurement records contain identifying information (Handle, Token, Module)\r
+ and start and end time values.\r
+ Dp uses this information to group records in different ways. It also uses\r
+ timer information to calculate elapsed time for each measurement.\r
+ \r
+ Copyright (c) 2009 - 2012, 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/UefiApplicationEntryPoint.h>\r
EFI_HII_HANDLE gHiiHandle;\r
SHELL_PARAM_ITEM *DpParamList = NULL;\r
CHAR16 *mPrintTokenBuffer = NULL;\r
-CHAR16 mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
-CHAR16 mUnicodeToken[PERF_TOKEN_LENGTH + 1];\r
+CHAR16 mGaugeString[DP_GAUGE_STRING_LENGTH + 1];\r
+CHAR16 mUnicodeToken[DXE_PERFORMANCE_STRING_SIZE];\r
UINT64 mInterestThreshold;\r
+BOOLEAN mShowId = FALSE;\r
\r
PERF_SUMMARY_DATA SummaryData = { 0 }; ///< Create the SummaryData structure and init. to ZERO.\r
\r
{STRING_TOKEN (STR_DP_OPTION_UT), TypeFlag}, // -T Dump Trace Data\r
#endif\r
{STRING_TOKEN (STR_DP_OPTION_LX), TypeFlag}, // -x eXclude Cumulative Items\r
+ {STRING_TOKEN (STR_DP_OPTION_LI), TypeFlag}, // -i Display Identifier\r
{STRING_TOKEN (STR_DP_OPTION_LN), TypeValue}, // -n # Number of records to display for A and R\r
{STRING_TOKEN (STR_DP_OPTION_LT), TypeValue} // -t # Threshold of interest\r
};\r
\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
- if (Buffer != NULL) {\r
- FreePool (Buffer);\r
- }\r
-}\r
-\r
/**\r
Transfer the param list value and get the command line parse.\r
\r
#endif // PROFILING_IMPLEMENTED\r
PrintToken (STRING_TOKEN (STR_DP_HELP_THRESHOLD));\r
PrintToken (STRING_TOKEN (STR_DP_HELP_COUNT));\r
+ PrintToken (STRING_TOKEN (STR_DP_HELP_ID));\r
PrintToken (STRING_TOKEN (STR_DP_HELP_HELP));\r
Print(L"\n");\r
}\r
EFI_STRING StringDpOptionLx;\r
EFI_STRING StringDpOptionLn;\r
EFI_STRING StringDpOptionLt;\r
+ EFI_STRING StringDpOptionLi;\r
\r
SummaryMode = FALSE;\r
VerboseMode = FALSE;\r
StringDpOptionLx = NULL;\r
StringDpOptionLn = NULL;\r
StringDpOptionLt = NULL;\r
+ StringDpOptionLi = NULL;\r
StringPtr = NULL;\r
\r
// Get DP's entry time as soon as possible.\r
StringDpOptionLx = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_OPTION_LX), NULL);\r
StringDpOptionLn = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_OPTION_LN), NULL);\r
StringDpOptionLt = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_OPTION_LT), NULL);\r
+ StringDpOptionLi = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_OPTION_LI), NULL);\r
\r
// Boolean Options\r
// \r
ProfileMode = ShellCommandLineGetFlag (ParamPackage, StringDpOptionUp);\r
#endif // PROFILING_IMPLEMENTED\r
ExcludeMode = ShellCommandLineGetFlag (ParamPackage, StringDpOptionLx);\r
+ mShowId = ShellCommandLineGetFlag (ParamPackage, StringDpOptionLi);\r
\r
// Options with Values\r
CmdLineArg = ShellCommandLineGetValue (ParamPackage, StringDpOptionLn);\r
SafeFreePool (StringDpOptionLx);\r
SafeFreePool (StringDpOptionLn);\r
SafeFreePool (StringDpOptionLt);\r
+ SafeFreePool (StringDpOptionLi);\r
SafeFreePool (StringPtr);\r
SafeFreePool (mPrintTokenBuffer);\r
\r