]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpUtilities.c
UefiCpuPkg/AcpiCpuData: Update RegisterTableEntry type
[mirror_edk2.git] / PerformancePkg / Dp_App / DpUtilities.c
index b49844a058b8a3efe8e7db45f1c791ed56223351..d3a9b6eab3fa397cd9555f08e64ec7eea7e1c7dd 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   Utility functions used by the Dp application.\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 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
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,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/PrintLib.h>\r
 #include <Library/HiiLib.h>\r
@@ -82,6 +82,10 @@ GetDuration (
   UINT64    Duration;\r
   BOOLEAN   Error;\r
 \r
+  if (Measurement->EndTimeStamp == 0) {\r
+    return 0;\r
+  }\r
+\r
   // PERF_START macros are called with a value of 1 to indicate\r
   // the beginning of time.  So, adjust the start ticker value\r
   // to the real beginning of time.\r
@@ -165,7 +169,7 @@ GetShortPdbFileName (
     for (EndIndex = 0; PdbFileName[EndIndex] != 0; EndIndex++)\r
       ;\r
     for (IndexA = 0; PdbFileName[IndexA] != 0; IndexA++) {\r
-      if (PdbFileName[IndexA] == '\\') {\r
+      if ((PdbFileName[IndexA] == '\\') || (PdbFileName[IndexA] == '/')) {\r
         StartIndex = IndexA + 1;\r
       }\r
 \r