From: Bret Barkelew <bret.barke...@microsoft.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1888

Use PERF_FUNCTION_BEGIN and PERF_FUNCTION_END to replace
PERF_START_EX and PERF_FUNCTION_END.

Cc: Chao Zhang <chao.b.zh...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Jian Wang <jian.j.w...@intel.com>
Signed-off-by: Zhichao Gao <zhichao....@intel.com>
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c 
b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index a2729457b7..001e0aac4d 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -45,8 +45,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/ReportStatusCodeLib.h>
 #include <Library/Tcg2PhysicalPresenceLib.h>
 
-#define PERF_ID_TCG2_DXE  0x3120
-
 typedef struct {
   CHAR16                                 *VariableName;
   EFI_GUID                               *VendorGuid;
@@ -2250,7 +2248,7 @@ OnReadyToBoot (
   EFI_STATUS                        Status;
   TPM_PCRINDEX                      PcrIndex;
 
-  PERF_START_EX (mImageHandle, "EventRec", "Tcg2Dxe", 0, PERF_ID_TCG2_DXE);
+  PERF_FUNCTION_BEGIN ();
   if (mBootAttempts == 0) {
 
     //
@@ -2332,7 +2330,7 @@ OnReadyToBoot (
   // Increase boot attempt counter.
   //
   mBootAttempts++;
-  PERF_END_EX (mImageHandle, "EventRec", "Tcg2Dxe", 0, PERF_ID_TCG2_DXE + 1);
+  PERF_FUNCTION_END ();
 }
 
 /**
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42071): https://edk2.groups.io/g/devel/message/42071
Mute This Topic: https://groups.io/mt/32001829/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to