12#define SMM_MP_PERF_PROCEDURE_NAME(procedure) # procedure
14CHAR8 *gSmmMpPerfProcedureName[] = {
15 SMM_MP_PERF_PROCEDURE_LIST (SMM_MP_PERF_PROCEDURE_NAME)
33 mSmmMpProcedurePerformance =
AllocateZeroPool (NumberofCpus *
sizeof (*mSmmMpProcedurePerformance));
34 ASSERT (mSmmMpProcedurePerformance !=
NULL);
52 for (CpuIndex = 0; CpuIndex < NumberofCpus; CpuIndex++) {
53 if ((CpuIndex != BspIndex) && !
FeaturePcdGet (PcdSmmApPerfLogEnable)) {
60 for (MpProcecureId = 0; MpProcecureId < SMM_MP_PERF_PROCEDURE_ID (SmmMpProcedureMax); MpProcecureId++) {
61 if (mSmmMpProcedurePerformance[CpuIndex].Begin[MpProcecureId] != 0) {
62 PERF_START (
NULL, gSmmMpPerfProcedureName[MpProcecureId],
NULL, mSmmMpProcedurePerformance[CpuIndex].Begin[MpProcecureId]);
63 PERF_END (
NULL, gSmmMpPerfProcedureName[MpProcecureId],
NULL, mSmmMpProcedurePerformance[CpuIndex].End[MpProcecureId]);
68 ZeroMem (mSmmMpProcedurePerformance, NumberofCpus *
sizeof (*mSmmMpProcedurePerformance));
UINT64 EFIAPI GetPerformanceCounter(VOID)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define FeaturePcdGet(TokenName)
VOID MpPerfBegin(IN UINTN CpuIndex, IN UINTN MpProcedureId)
VOID MpPerfEnd(IN UINTN CpuIndex, IN UINTN MpProcedureId)
VOID MigrateMpPerf(UINTN NumberofCpus, UINTN BspIndex)
VOID InitializeMpPerf(UINTN NumberofCpus)