In PerformanceLib, Identifier is for single PERF, not the pair of PERF.
When find the matched START and END pair, the identifier will not be checked.

Cc: Star Zeng <star.z...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming....@intel.com>
---
 .../Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c        | 9 ++++-----
 MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c       | 4 ++--
 MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c | 4 ++--
 MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c       | 7 +++----
 .../Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c        | 9 ++++-----
 MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c       | 4 ++--
 6 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c 
b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index c3a6d70..4739bb8 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -10,7 +10,7 @@
   This library is mainly used by DxeCore to start performance logging to 
ensure that
   Performance Protocol is installed at the very beginning of DXE phase.
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
@@ -110,8 +110,7 @@ InternalSearchForGaugeEntry (
     if (GaugeEntryExArray[Index2].EndTimeStamp == 0 &&
         (GaugeEntryExArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) 
Handle) &&
         AsciiStrnCmp (GaugeEntryExArray[Index2].Token, Token, 
DXE_PERFORMANCE_STRING_LENGTH) == 0 &&
-        AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, 
DXE_PERFORMANCE_STRING_LENGTH) == 0 &&
-        (GaugeEntryExArray[Index2].Identifier == Identifier)) {
+        AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, 
DXE_PERFORMANCE_STRING_LENGTH) == 0) {
       Index = Index2;
       break;
     }
@@ -216,7 +215,7 @@ StartGaugeEx (
   for the first matching record that contains a zero end time and fills in a 
valid end time.
 
   Searches the performance measurement log from the beginning of the log
-  for the first record that matches Handle, Token, Module and Identifier and 
has an end time value of zero.
+  for the first record that matches Handle, Token and Module and has an end 
time value of zero.
   If the record can not be found then return EFI_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then the end time in the record is filled in with the value specified by 
TimeStamp.
@@ -578,7 +577,7 @@ StartPerformanceMeasurementEx (
   for the first matching record that contains a zero end time and fills in a 
valid end time.
 
   Searches the performance measurement log from the beginning of the log
-  for the first record that matches Handle, Token, Module and Identifier and 
has an end time value of zero.
+  for the first record that matches Handle, Token and Module and has an end 
time value of zero.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then the end time in the record is filled in with the value specified by 
TimeStamp.
diff --git a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c 
b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c
index 2ddd983..cb62d52 100644
--- a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c
+++ b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c
@@ -6,7 +6,7 @@
   to log performance data. If both PerformanceEx and Performance Protocol is 
not available, it does not log any
   performance information.
 
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -131,7 +131,7 @@ StartPerformanceMeasurementEx (
 /**
   Fills in the end time of a performance measurement.
 
-  Looks up the record that matches Handle, Token, Module and Identifier.
+  Looks up the record that matches Handle, Token and Module.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then TimeStamp is added to the record as the end time.
diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c 
b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c
index 3c7cfc1..218cf8b 100644
--- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c
+++ b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c
@@ -5,7 +5,7 @@
   StartPerformanceMeasurement(), EndPerformanceMeasurement(), 
StartPerformanceMeasurementEx()
   and EndPerformanceMeasurementEx() are not implemented.
 
-  Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -166,7 +166,7 @@ StartPerformanceMeasurementEx (
 /**
   Fills in the end time of a performance measurement.
 
-  Looks up the record that matches Handle, Token, Module and Identifier.
+  Looks up the record that matches Handle, Token and Module.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then TimeStamp is added to the record as the end time.
diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c 
b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
index b3b11b9..62527b2 100644
--- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
+++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
@@ -7,7 +7,7 @@
   number of performance logging entry is specified by 
PcdMaxPeiPerformanceLogEntries or 
   PcdMaxPeiPerformanceLogEntries16.
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
@@ -140,8 +140,7 @@ InternalSearchForLogEntry (
     if (LogEntryArray[Index2].EndTimeStamp == 0 &&
         (LogEntryArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) 
Handle) &&
         AsciiStrnCmp (LogEntryArray[Index2].Token, Token, 
PEI_PERFORMANCE_STRING_LENGTH) == 0 &&
-        AsciiStrnCmp (LogEntryArray[Index2].Module, Module, 
PEI_PERFORMANCE_STRING_LENGTH) == 0 &&
-        (PeiPerformanceIdArray[Index2] == Identifier)) {
+        AsciiStrnCmp (LogEntryArray[Index2].Module, Module, 
PEI_PERFORMANCE_STRING_LENGTH) == 0) {
       Index = Index2;
       break;
     }
@@ -222,7 +221,7 @@ StartPerformanceMeasurementEx (
 /**
   Fills in the end time of a performance measurement.
 
-  Looks up the record that matches Handle, Token, Module and Identifier.
+  Looks up the record that matches Handle, Token and Module.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then TimeStamp is added to the record as the end time.
diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c 
b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
index e59cc28..6f8d2dd 100644
--- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
+++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.c
@@ -16,7 +16,7 @@
 
  SmmPerformanceHandlerEx(), SmmPerformanceHandler() will receive untrusted 
input and do basic validation.
 
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -118,8 +118,7 @@ SmmSearchForGaugeEntry (
     if (GaugeEntryExArray[Index2].EndTimeStamp == 0 &&
         (GaugeEntryExArray[Index2].Handle == (EFI_PHYSICAL_ADDRESS) (UINTN) 
Handle) &&
         AsciiStrnCmp (GaugeEntryExArray[Index2].Token, Token, 
SMM_PERFORMANCE_STRING_LENGTH) == 0 &&
-        AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, 
SMM_PERFORMANCE_STRING_LENGTH) == 0 &&
-        (GaugeEntryExArray[Index2].Identifier == Identifier)) {
+        AsciiStrnCmp (GaugeEntryExArray[Index2].Module, Module, 
SMM_PERFORMANCE_STRING_LENGTH) == 0) {
       Index = Index2;
       break;
     }
@@ -229,7 +228,7 @@ StartGaugeEx (
   for the first matching record that contains a zero end time and fills in a 
valid end time.
 
   Searches the performance measurement log from the beginning of the log
-  for the first record that matches Handle, Token, Module and Identifier and 
has an end time value of zero.
+  for the first record that matches Handle, Token and Module and has an end 
time value of zero.
   If the record can not be found then return EFI_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then the end time in the record is filled in with the value specified by 
TimeStamp.
@@ -827,7 +826,7 @@ StartPerformanceMeasurementEx (
   for the first matching record that contains a zero end time and fills in a 
valid end time.
 
   Searches the performance measurement log from the beginning of the log
-  for the first record that matches Handle, Token, Module and Identifier and 
has an end time value of zero.
+  for the first record that matches Handle, Token and Module and has an end 
time value of zero.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then the end time in the record is filled in with the value specified by 
TimeStamp.
diff --git a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c 
b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c
index c01d16d..4a08c24 100644
--- a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c
+++ b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c
@@ -6,7 +6,7 @@
   to log performance data. If both SMM PerformanceEx and Performance Protocol 
are not available, it does not log any
   performance information.
 
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -153,7 +153,7 @@ StartPerformanceMeasurementEx (
 /**
   Fills in the end time of a performance measurement.
 
-  Looks up the record that matches Handle, Token, Module and Identifier.
+  Looks up the record that matches Handle, Token and Module.
   If the record can not be found then return RETURN_NOT_FOUND.
   If the record is found and TimeStamp is not zero,
   then TimeStamp is added to the record as the end time.
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to