From nobody Mon Sep 16 19:03:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1529393212445608.3571316032068; Tue, 19 Jun 2018 00:26:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A96252112A28A; Tue, 19 Jun 2018 00:26:51 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 961F421106A33 for ; Tue, 19 Jun 2018 00:26:49 -0700 (PDT) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 00:26:49 -0700 Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga006.jf.intel.com with ESMTP; 19 Jun 2018 00:26:45 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,242,1526367600"; d="scan'208";a="51022369" From: Dandan Bi To: edk2-devel@lists.01.org Date: Tue, 19 Jun 2018 15:24:03 +0800 Message-Id: <20180619072405.142872-8-dandan.bi@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 In-Reply-To: <20180619072405.142872-1-dandan.bi@intel.com> References: <20180619072405.142872-1-dandan.bi@intel.com> Subject: [edk2] [patch 7/9] MdeModulePkg: Use new added Perf macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng , Liming Gao , Eric Dong MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Replace old Perf macros with the new added ones. Cc: Liming Gao Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 7 +++++ MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 8 ++---- MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 8 +++--- MdeModulePkg/Core/Dxe/Image/Image.c | 30 +++++-------------= ---- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 8 +++--- MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 17 ++++++------ MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 15 ++++------- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 4 +-- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 2 +- .../Library/UefiBootManagerLib/BmConsole.c | 9 +++---- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 21 ++++++++------- 11 files changed, 53 insertions(+), 76 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Dxe/Dispatcher/Dispatcher.c index 088cd810631..4c6ca761a60 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -417,10 +417,11 @@ CoreDispatcher ( LIST_ENTRY *Link; EFI_CORE_DRIVER_ENTRY *DriverEntry; BOOLEAN ReadyToRun; EFI_EVENT DxeDispatchEvent; =20 + PERF_FUNCTION_BEGIN (); =20 if (gDispatcherRunning) { // // If the dispatcher is running don't let it be restarted. // @@ -582,10 +583,12 @@ CoreDispatcher ( // CoreCloseEvent (DxeDispatchEvent); =20 gDispatcherRunning =3D FALSE; =20 + PERF_FUNCTION_END (); + return ReturnStatus; } =20 =20 /** @@ -1435,17 +1438,21 @@ CoreFwVolEventProtocolNotify ( VOID CoreInitializeDispatcher ( VOID ) { + PERF_FUNCTION_BEGIN (); + mFwVolEvent =3D EfiCreateProtocolNotifyEvent ( &gEfiFirmwareVolume2ProtocolGuid, TPL_CALLBACK, CoreFwVolEventProtocolNotify, NULL, &mFwVolEventRegistration ); + + PERF_FUNCTION_END (); } =20 // // Function only used in debug builds // diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dx= e/DxeMain/DxeMain.c index 07c74034624..3f753738a27 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -299,12 +299,12 @@ DxeMain ( =20 // // Call constructor for all libraries // ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST); - PERF_END (NULL,"PEI", NULL, 0) ; - PERF_START (NULL,"DXE", NULL, 0) ; + PERF_CROSSMODULE_END ("PEI"); + PERF_CROSSMODULE_BEGIN ("DXE"); =20 // // Report DXE Core image information to the PE/COFF Extra Action Library // ZeroMem (&ImageContext, sizeof (ImageContext)); @@ -497,20 +497,16 @@ DxeMain ( ASSERT_EFI_ERROR (Status); =20 // // Initialize the DXE Dispatcher // - PERF_START (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ; CoreInitializeDispatcher (); - PERF_END (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ; =20 // // Invoke the DXE Dispatcher // - PERF_START (NULL, "CoreDispatcher", "DxeMain", 0); CoreDispatcher (); - PERF_END (NULL, "CoreDispatcher", "DxeMain", 0); =20 // // Display Architectural protocols that were not loaded if this is DEBUG= build // DEBUG_CODE_BEGIN (); diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core= /Dxe/Hand/DriverSupport.c index 33dd0bd0b7c..ab3cc0c07e5 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -625,32 +625,32 @@ CoreConnectSingleController ( DriverBinding =3D NULL; DriverFound =3D FALSE; for (Index =3D 0; (Index < NumberOfSortedDriverBindingProtocols) && !D= riverFound; Index++) { if (SortedDriverBindingProtocols[Index] !=3D NULL) { DriverBinding =3D SortedDriverBindingProtocols[Index]; - PERF_START (DriverBinding->DriverBindingHandle, "DB:Support:", NUL= L, 0); + PERF_DRIVER_BINDING_SUPPORT_BEGIN (DriverBinding->DriverBindingHan= dle, ControllerHandle); Status =3D DriverBinding->Supported( DriverBinding, ControllerHandle, RemainingDevicePath ); - PERF_END (DriverBinding->DriverBindingHandle, "DB:Support:", NULL,= 0); + PERF_DRIVER_BINDING_SUPPORT_END (DriverBinding->DriverBindingHandl= e, ControllerHandle); if (!EFI_ERROR (Status)) { SortedDriverBindingProtocols[Index] =3D NULL; DriverFound =3D TRUE; =20 // // A driver was found that supports ControllerHandle, so attempt= to start the driver // on ControllerHandle. // - PERF_START (DriverBinding->DriverBindingHandle, "DB:Start:", NUL= L, 0); + PERF_DRIVER_BINDING_START_BEGIN (DriverBinding->DriverBindingHan= dle, ControllerHandle); Status =3D DriverBinding->Start ( DriverBinding, ControllerHandle, RemainingDevicePath ); - PERF_END (DriverBinding->DriverBindingHandle, "DB:Start:", NULL,= 0); + PERF_DRIVER_BINDING_START_END (DriverBinding->DriverBindingHandl= e, ControllerHandle); =20 if (!EFI_ERROR (Status)) { // // The driver was successfully started on ControllerHandle, so= set a flag // diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Im= age/Image.c index c49ddfcc81d..adeb4bf313a 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1434,17 +1434,13 @@ CoreLoadImage ( IN UINTN SourceSize, OUT EFI_HANDLE *ImageHandle ) { EFI_STATUS Status; - UINT64 Tick; EFI_HANDLE Handle; =20 - Tick =3D 0; - PERF_CODE ( - Tick =3D GetPerformanceCounter (); - ); + PERF_LOAD_IMAGE_BEGIN (NULL); =20 Status =3D CoreLoadImageCommon ( BootPolicy, ParentImageHandle, FilePath, @@ -1463,12 +1459,11 @@ CoreLoadImage ( // ImageHandle will be valid only Status is success.=20 // Handle =3D *ImageHandle; } =20 - PERF_START (Handle, "LoadImage:", NULL, Tick); - PERF_END (Handle, "LoadImage:", NULL, 0); + PERF_LOAD_IMAGE_END (Handle); =20 return Status; } =20 =20 @@ -1524,17 +1519,13 @@ CoreLoadImageEx ( OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIONAL, IN UINT32 Attribute ) { EFI_STATUS Status; - UINT64 Tick; EFI_HANDLE Handle; =20 - Tick =3D 0; - PERF_CODE ( - Tick =3D GetPerformanceCounter (); - ); + PERF_LOAD_IMAGE_BEGIN (NULL); =20 Status =3D CoreLoadImageCommon ( TRUE, ParentImageHandle, FilePath, @@ -1553,12 +1544,11 @@ CoreLoadImageEx ( // ImageHandle will be valid only Status is success.=20 // Handle =3D *ImageHandle; } =20 - PERF_START (Handle, "LoadImage:", NULL, Tick); - PERF_END (Handle, "LoadImage:", NULL, 0); + PERF_LOAD_IMAGE_END (Handle); =20 return Status; } =20 =20 @@ -1592,14 +1582,12 @@ CoreStartImage ( EFI_STATUS Status; LOADED_IMAGE_PRIVATE_DATA *Image; LOADED_IMAGE_PRIVATE_DATA *LastImage; UINT64 HandleDatabaseKey; UINTN SetJumpFlag; - UINT64 Tick; EFI_HANDLE Handle; =20 - Tick =3D 0; Handle =3D ImageHandle; =20 Image =3D CoreLoadedImageInfo (ImageHandle); if (Image =3D=3D NULL || Image->Started) { return EFI_INVALID_PARAMETER; @@ -1619,13 +1607,11 @@ CoreStartImage ( DEBUG ((EFI_D_ERROR, "Image type %s can't be started ", GetMachineType= Name(Image->Machine))); DEBUG ((EFI_D_ERROR, "on %s UEFI system.\n", GetMachineTypeName(mDxeCo= reImageMachineType))); return EFI_UNSUPPORTED; } =20 - PERF_CODE ( - Tick =3D GetPerformanceCounter (); - ); + PERF_START_IMAGE_BEGIN (Handle); =20 =20 // // Push the current start image context, and // link the current image to the head. This is the @@ -1645,12 +1631,11 @@ CoreStartImage ( if (Image->JumpBuffer =3D=3D NULL) { // // Image may be unloaded after return with failure, // then ImageHandle may be invalid, so use NULL handle to record perf = log. // - PERF_START (NULL, "StartImage:", NULL, Tick); - PERF_END (NULL, "StartImage:", NULL, 0); + PERF_START_IMAGE_END (NULL); =20 // // Pop the current start image context // mCurrentImage =3D LastImage; @@ -1761,12 +1746,11 @@ CoreStartImage ( } =20 // // Done // - PERF_START (Handle, "StartImage:", NULL, Tick); - PERF_END (Handle, "StartImage:", NULL, 0); + PERF_START_IMAGE_END (Handle); return Status; } =20 /** Terminates the currently loaded EFI image and returns control to boot se= rvices. diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 0ac3fdde6a9..c4f629dadff 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -998,13 +998,13 @@ PeiDispatcher ( // // Call the PEIM entry point // PeimEntryPoint =3D (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint; =20 - PERF_START (PeimFileHandle, "PEIM", NULL, 0); + PERF_START_IMAGE_BEGIN (PeimFileHandle); PeimEntryPoint(PeimFileHandle, (const EFI_PEI_SERVICES **) &Pr= ivate->Ps); - PERF_END (PeimFileHandle, "PEIM", NULL, 0); + PERF_START_IMAGE_END (PeimFileHandle); } =20 // // Process the Notify list and dispatch any notifies for // newly installed PPIs. @@ -1107,11 +1107,11 @@ PeiDispatcher ( if (Status =3D=3D EFI_SUCCESS) { // // The PEIM has its dependencies satisfied, and its entry = point // has been found, so invoke it. // - PERF_START (PeimFileHandle, "PEIM", NULL, 0); + PERF_START_IMAGE_BEGIN (PeimFileHandle); =20 REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_BEGIN), (VOID *)(&PeimFileHandle), @@ -1143,11 +1143,11 @@ PeiDispatcher ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT_END), (VOID *)(&PeimFileHandle), sizeof (PeimFileHandle) ); - PERF_END (PeimFileHandle, "PEIM", NULL, 0); + PERF_START_IMAGE_END (PeimFileHandle); =20 } } =20 PeiCheckAndSwitchStack (SecCoreData, Private); diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pe= i/PeiMain/PeiMain.c index 775bf18ce93..a52e6f02017 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -350,22 +350,21 @@ PeiCore ( =20 // // Update performance measurements=20 // if (OldCoreData =3D=3D NULL) { - PERF_START (NULL, "SEC", NULL, 1); - PERF_END (NULL, "SEC", NULL, 0); + PERF_EVENT ("SEC"); // Means the end of SEC phase. =20 // // If first pass, start performance measurement. // - PERF_START (NULL,"PEI", NULL, 0); - PERF_START (NULL,"PreMem", NULL, 0); + PERF_CROSSMODULE_BEGIN ("PEI"); + PERF_INMODULE_BEGIN ("PreMem"); =20 } else { - PERF_END (NULL,"PreMem", NULL, 0); - PERF_START (NULL,"PostMem", NULL, 0); + PERF_INMODULE_END ("PreMem"); + PERF_INMODULE_BEGIN ("PostMem"); } =20 // // Complete PEI Core Service initialization // =20 @@ -409,19 +408,19 @@ PeiCore ( } =20 // // Alert any listeners that there is permanent memory available // - PERF_START (NULL,"DisMem", NULL, 0); + PERF_INMODULE_BEGIN ("DisMem"); Status =3D PeiServicesInstallPpi (&mMemoryDiscoveredPpi); =20 // // Process the Notify list and dispatch any notifies for the Memory Di= scovered PPI // ProcessNotifyList (&PrivateData); =20 - PERF_END (NULL,"DisMem", NULL, 0); + PERF_INMODULE_END ("DisMem"); } =20 // // Call PEIM dispatcher // @@ -435,11 +434,11 @@ PeiCore ( } =20 // // Measure PEI Core execution time. // - PERF_END (NULL, "PostMem", NULL, 0); + PERF_INMODULE_END ("PostMem"); =20 // // Lookup DXE IPL PPI // Status =3D PeiServicesLocatePpi ( diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/P= iSmmCore/Dispatcher.c index f32bbbd1b4b..0b3b5924d38 100644 --- a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c +++ b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c @@ -319,17 +319,13 @@ SmmLoadImage ( EFI_DEVICE_PATH_PROTOCOL *FilePath; EFI_DEVICE_PATH_PROTOCOL *OriginalFilePath; EFI_DEVICE_PATH_PROTOCOL *HandleFilePath; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; - UINT64 Tick; =20 - Tick =3D 0; - PERF_CODE ( - Tick =3D GetPerformanceCounter (); - ); - =20 + PERF_LOAD_IMAGE_BEGIN (DriverEntry->ImageHandle); + Buffer =3D NULL; Size =3D 0; Fv =3D DriverEntry->Fv; NameGuid =3D &DriverEntry->FileName; FilePath =3D DriverEntry->FvFileDevicePath; @@ -639,12 +635,11 @@ SmmLoadImage ( &gEfiLoadedImageProtocolGuid, EFI_NATIVE_INTERFACE, &DriverEntry->SmmLoadedImage ); =20 - PERF_START (DriverEntry->ImageHandle, "LoadImage:", NULL, Tick); - PERF_END (DriverEntry->ImageHandle, "LoadImage:", NULL, 0); + PERF_LOAD_IMAGE_END (DriverEntry->ImageHandle); =20 // // Print the load address and the PDB file name if it is available // =20 @@ -907,13 +902,13 @@ SmmDispatcher ( =20 // // For each SMM driver, pass NULL as ImageHandle // RegisterSmramProfileImage (DriverEntry, TRUE); - PERF_START (DriverEntry->ImageHandle, "StartImage:", NULL, 0); + PERF_START_IMAGE_BEGIN (DriverEntry->ImageHandle); Status =3D ((EFI_IMAGE_ENTRY_POINT)(UINTN)DriverEntry->ImageEntryPoi= nt)(DriverEntry->ImageHandle, gST); - PERF_END (DriverEntry->ImageHandle, "StartImage:", NULL, 0); + PERF_START_IMAGE_END (DriverEntry->ImageHandle); if (EFI_ERROR(Status)){ UnregisterSmramProfileImage (DriverEntry, TRUE); SmmFreePages(DriverEntry->ImageBuffer, DriverEntry->NumberOfPage); // // Uninstall LoadedImage diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/Pi= SmmCore/PiSmmCore.c index 686b9b45a55..45f40e0e60c 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -642,11 +642,11 @@ SmmEntryPoint ( BOOLEAN InLegacyBoot; BOOLEAN IsOverlapped; VOID *CommunicationBuffer; UINTN BufferSize; =20 - PERF_START (NULL, "SMM", NULL, 0) ; + PERF_INMODULE_BEGIN ("SMM"); =20 // // Update SMST with contents of the SmmEntryContext structure // gSmmCoreSmst.SmmStartupThisAp =3D SmmEntryContext->SmmStartupThisAp; @@ -737,11 +737,11 @@ SmmEntryPoint ( // Clear the InSmm flag as we are going to leave SMM // gSmmCorePrivate->InSmm =3D FALSE; } =20 - PERF_END (NULL, "SMM", NULL, 0) ; + PERF_INMODULE_END ("SMM"); } =20 /** Install LoadedImage protocol for SMM Core. **/ diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index b842d5824ae..59bd1e4c6c0 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -43,11 +43,11 @@ BmEndOfBdsPerfCode ( ) { // // Record the performance data for End of BDS // - PERF_END(NULL, "BDS", NULL, 0); + PERF_CROSSMODULE_END("BDS"); =20 return ; } =20 /** diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c b/MdeModul= ePkg/Library/UefiBootManagerLib/BmConsole.c index 80511814eec..d85b603d64a 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c @@ -720,27 +720,24 @@ EfiBootManagerConnectAllDefaultConsoles ( =20 Status =3D EfiBootManagerConnectConsoleVariable (ConOut); if (!EFI_ERROR (Status)) { OneConnected =3D TRUE; } - PERF_START (NULL, "ConOutReady", "BDS", 1); - PERF_END (NULL, "ConOutReady", "BDS", 0); + PERF_EVENT ("ConOutReady"); =20 =20 Status =3D EfiBootManagerConnectConsoleVariable (ConIn); if (!EFI_ERROR (Status)) { OneConnected =3D TRUE; } - PERF_START (NULL, "ConInReady", "BDS", 1); - PERF_END (NULL, "ConInReady", "BDS", 0); + PERF_EVENT ("ConInReady"); =20 Status =3D EfiBootManagerConnectConsoleVariable (ErrOut); if (!EFI_ERROR (Status)) { OneConnected =3D TRUE; } - PERF_START (NULL, "ErrOutReady", "BDS", 1); - PERF_END (NULL, "ErrOutReady", "BDS", 0); + PERF_EVENT ("ErrOutReady"); =20 SystemTableUpdated =3D FALSE; // // Fill console handles in System Table if no console device assignd. // diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index 3191a986304..acb25abfcd4 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -723,12 +723,12 @@ BdsEntry ( BootSuccess =3D FALSE; =20 // // Insert the performance probe // - PERF_END (NULL, "DXE", NULL, 0); - PERF_START (NULL, "BDS", NULL, 0); + PERF_CROSSMODULE_END("DXE"); + PERF_CROSSMODULE_BEGIN("BDS"); DEBUG ((EFI_D_INFO, "[Bds] Entry...\n")); =20 // // Fill in FirmwareVendor and FirmwareRevision from PCDs // @@ -886,13 +886,13 @@ BdsEntry ( // > Register new Driver#### or Boot#### // > Register new Key####: e.g.: F12=20 // > Signal ReadyToLock event // > Authentication action: 1. connect Auth devices; 2. Identify auto lo= gon user. // - PERF_START (NULL, "PlatformBootManagerBeforeConsole", "BDS", 0); + PERF_INMODULE_BEGIN("PlatformBootManagerBeforeConsole"); PlatformBootManagerBeforeConsole (); - PERF_END (NULL, "PlatformBootManagerBeforeConsole", "BDS", 0); + PERF_INMODULE_END("PlatformBootManagerBeforeConsole"); =20 // // Initialize hotkey service // EfiBootManagerStartHotkeyService (&HotkeyTriggered); @@ -905,21 +905,21 @@ BdsEntry ( EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); =20 // // Connect consoles // - PERF_START (NULL, "EfiBootManagerConnectAllDefaultConsoles", "BDS", 0); + PERF_INMODULE_BEGIN("EfiBootManagerConnectAllDefaultConsoles"); if (PcdGetBool (PcdConInConnectOnDemand)) { EfiBootManagerConnectConsoleVariable (ConOut); EfiBootManagerConnectConsoleVariable (ErrOut); // // Do not connect ConIn devices when lazy ConIn feature is ON. // } else { EfiBootManagerConnectAllDefaultConsoles (); } - PERF_END (NULL, "EfiBootManagerConnectAllDefaultConsoles", "BDS", 0); + PERF_INMODULE_END("EfiBootManagerConnectAllDefaultConsoles"); =20 // // Do the platform specific action after the console is ready // Possible things that can be done in PlatformBootManagerAfterConsole: // > Console post action: @@ -928,13 +928,13 @@ BdsEntry ( // > Run diagnostics like memory testing // > Connect certain devices // > Dispatch aditional option roms // > Special boot: e.g.: USB boot, enter UI //=20 - PERF_START (NULL, "PlatformBootManagerAfterConsole", "BDS", 0); + PERF_INMODULE_BEGIN("PlatformBootManagerAfterConsole"); PlatformBootManagerAfterConsole (); - PERF_END (NULL, "PlatformBootManagerAfterConsole", "BDS", 0); + PERF_INMODULE_END("PlatformBootManagerAfterConsole"); // // Boot to Boot Manager Menu when EFI_OS_INDICATIONS_BOOT_TO_FW_UI is se= t. Skip HotkeyBoot // DataSize =3D sizeof (UINT64); Status =3D gRT->GetVariable ( @@ -1023,14 +1023,13 @@ BdsEntry ( EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); =20 // // Execute Key#### // - PERF_START (NULL, "BdsWait", "BDS", 0); + PERF_INMODULE_BEGIN ("BdsWait"); BdsWait (HotkeyTriggered); - PERF_END (NULL, "BdsWait", "BDS", 0); - + PERF_INMODULE_END ("BdsWait"); // // BdsReadKeys() can be removed after all keyboard drivers invoke call= back in timer callback. // BdsReadKeys (); =20 --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel