Skip to content

Commit 03e7c8c

Browse files
Sherry Fanmergify[bot]
authored andcommitted
MdeModulePkg: Update performance measurements to use new perf macros
Updates BmBoot and dispatcher to use new perf macros. Signed-off-by: Sherry Fan <[email protected]>
1 parent b074eb7 commit 03e7c8c

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ CoreDispatcher (
414414
//
415415
// If the dispatcher is running don't let it be restarted.
416416
//
417+
PERF_FUNCTION_END ();
417418
return EFI_ALREADY_STARTED;
418419
}
419420

@@ -428,6 +429,7 @@ CoreDispatcher (
428429
&DxeDispatchEvent
429430
);
430431
if (EFI_ERROR (Status)) {
432+
PERF_FUNCTION_END ();
431433
return Status;
432434
}
433435

MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2072,13 +2072,14 @@ EfiBootManagerBoot (
20722072
);
20732073
ASSERT_EFI_ERROR (Status);
20742074
);
2075-
20762075
mBmLegacyBoot (BootOption);
20772076
} else {
20782077
BootOption->Status = EFI_UNSUPPORTED;
20792078
}
20802079

20812080
PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)OptionNumber);
2081+
PERF_CROSSMODULE_END ("BDS"); // BEGIN is in MdeModulePkg\Universal\BdsDxe\BdsEntry.c
2082+
PERF_CROSSMODULE_BEGIN ("BDS"); // Keep logging BDS in case of reentry
20822083
return;
20832084
}
20842085

@@ -2109,6 +2110,8 @@ EfiBootManagerBoot (
21092110
PERF_CODE (
21102111
BmEndOfBdsPerfCode (NULL, NULL);
21112112
);
2113+
PERF_CROSSMODULE_END ("BDS"); // BEGIN is in MdeModulePkg\Universal\BdsDxe\BdsEntry.c
2114+
PERF_CROSSMODULE_BEGIN ("BDS"); // Keep logging BDS in case of reentry
21122115

21132116
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCodeOsLoaderStart));
21142117

MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
6969
#include <Library/DxeServicesLib.h>
7070
#include <Library/ReportStatusCodeLib.h>
7171
#include <Library/CapsuleLib.h>
72-
#include <Library/PerformanceLib.h>
7372
#include <Library/HiiLib.h>
7473
#include <Library/VariablePolicyHelperLib.h>
7574

MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
MemoryAllocationLib
6060
DxeServicesLib
6161
ReportStatusCodeLib
62-
PerformanceLib
6362
HiiLib
6463
SortLib
6564
VariablePolicyHelperLib

0 commit comments

Comments
 (0)