/** @file\r
Trace reporting for the Dp utility.\r
\r
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/TimerLib.h>\r
#include <Library/PeCoffGetEntryPointLib.h>\r
#include <Library/PerformanceLib.h>\r
#include <Library/PrintLib.h>\r
/** \r
Gather and print Major Phase metrics.\r
\r
- @param[in] Ticker The timer value for the END of Shell phase\r
- \r
**/\r
VOID\r
ProcessPhases(\r
- IN UINT64 Ticker\r
+ VOID\r
)\r
{\r
MEASUREMENT_RECORD Measurement;\r
UINT64 PeiTime;\r
UINT64 DxeTime;\r
UINT64 BdsTime;\r
- UINT64 ShellTime;\r
UINT64 ElapsedTime;\r
UINT64 Duration;\r
UINT64 Total;\r
PeiTime = 0;\r
DxeTime = 0;\r
BdsTime = 0;\r
- ShellTime = 0; \r
//\r
// Get Execution Phase Statistics\r
//\r
&Measurement.EndTimeStamp,\r
&Measurement.Identifier)) != 0)\r
{\r
- if (AsciiStrnCmp (Measurement.Token, ALit_SHELL, PERF_TOKEN_LENGTH) == 0) {\r
- Measurement.EndTimeStamp = Ticker;\r
- }\r
if (Measurement.EndTimeStamp == 0) { // Skip "incomplete" records\r
continue;\r
}\r
DxeTime = Duration;\r
} else if (AsciiStrnCmp (Measurement.Token, ALit_BDS, PERF_TOKEN_LENGTH) == 0) {\r
BdsTime = Duration;\r
- } else if (AsciiStrnCmp (Measurement.Token, ALit_SHELL, PERF_TOKEN_LENGTH) == 0) {\r
- ShellTime = Duration;\r
}\r
}\r
\r
PrintToken (STRING_TOKEN (STR_DP_PHASE_BDSTO), ALit_BdsTO, ElapsedTime);\r
}\r
\r
- // print SHELL phase duration time\r
- //\r
- if (ShellTime > 0) {\r
- ElapsedTime = DivU64x32 (\r
- ShellTime,\r
- (UINT32)TimerInfo.Frequency\r
- );\r
- Total += ElapsedTime;\r
- PrintToken (STRING_TOKEN (STR_DP_PHASE_DURATION), ALit_SHELL, ElapsedTime);\r
- }\r
-\r
PrintToken (STRING_TOKEN (STR_DP_TOTAL_DURATION), Total);\r
}\r
\r