]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpTrace.c
PerformancePkg Dp_App: Remove TimerLib dependency
[mirror_edk2.git] / PerformancePkg / Dp_App / DpTrace.c
index 6a62bba7efe0236bd0037ac34bb81f61bc12df70..9b4e0ed289ad19d9938eb07ad25e9c92ed672f36 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
@@ -17,7 +17,6 @@
 #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
@@ -385,12 +384,10 @@ DumpRawTrace(
 /** \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
@@ -399,7 +396,6 @@ ProcessPhases(
   UINT64                    PeiTime;\r
   UINT64                    DxeTime;\r
   UINT64                    BdsTime;\r
-  UINT64                    ShellTime;\r
   UINT64                    ElapsedTime;\r
   UINT64                    Duration;\r
   UINT64                    Total;\r
@@ -412,7 +408,6 @@ ProcessPhases(
   PeiTime         = 0;\r
   DxeTime         = 0;\r
   BdsTime         = 0;\r
-  ShellTime       = 0;   \r
   //\r
   // Get Execution Phase Statistics\r
   //\r
@@ -433,9 +428,6 @@ ProcessPhases(
                           &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
@@ -453,8 +445,6 @@ ProcessPhases(
       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
@@ -509,17 +499,6 @@ ProcessPhases(
     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