X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;h=f8579600f61c4d213c2aaca536a94d4ce3339d7e;hp=c94331c010f6474da094c7e1b3329d0a23ab8619;hb=f5103f2a21871c587d00c92251c44961857ece32;hpb=2ce311322c72857f73138c45358e722607a1e80c diff --git a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c index c94331c010..f8579600f6 100644 --- a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -107,11 +107,11 @@ Returns: mTick = 0; -#ifdef EFI_PEI_PERFORMANCE - if (OldCoreData == NULL) { - mTick = GetPerformanceCounter (); + if (PerformanceMeasurementEnabled()) { + if (OldCoreData == NULL) { + mTick = GetPerformanceCounter (); + } } -#endif // // For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory() @@ -178,6 +178,7 @@ Returns: // // Alert any listeners that there is permanent memory available // + PERF_START (NULL,"DisMem", NULL, 0); Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi); PERF_END (NULL,"DisMem", NULL, 0); @@ -192,6 +193,7 @@ Returns: EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT ); + PERF_START (NULL,"PEI", NULL, mTick); // // If first pass, start performance measurement. //