X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;h=f8579600f61c4d213c2aaca536a94d4ce3339d7e;hp=f27b0274f5366b8588361b160351e1b2881e650c;hb=f5103f2a21871c587d00c92251c44961857ece32;hpb=a0b7c09f23c0f9d34e08a3391d5d0425d9040348 diff --git a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c index f27b0274f5..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() @@ -150,10 +150,10 @@ Returns: // // The following code dumps out interesting cache as RAM usage information // so we can keep tabs on how the cache as RAM is being utilized. The - // DEBUG_CODE macro is used to prevent this code from being compiled + // DEBUG_CODE_BEGIN macro is used to prevent this code from being compiled // on a debug build. // - DEBUG_CODE ( + DEBUG_CODE_BEGIN (); UINTN *StackPointer; UINTN StackValue; @@ -173,13 +173,14 @@ Returns: ((UINTN) OldCoreData->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) OldCoreData->HobList.Raw) )); - ); + DEBUG_CODE_END (); // // Alert any listeners that there is permanent memory available // + PERF_START (NULL,"DisMem", NULL, 0); - Status = PeiCoreInstallPpi (&mMemoryDiscoveredPpi); + Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi); PERF_END (NULL,"DisMem", NULL, 0); } else { @@ -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. // @@ -201,7 +203,7 @@ Returns: // If SEC provided any PPI services to PEI, install them. // if (PeiStartupDescriptor->DispatchTable != NULL) { - Status = PeiCoreInstallPpi (PeiStartupDescriptor->DispatchTable); + Status = PeiServicesInstallPpi (PeiStartupDescriptor->DispatchTable); ASSERT_EFI_ERROR (Status); } } @@ -220,7 +222,7 @@ Returns: PERF_END (NULL, "PostMem", NULL, 0); - Status = PeiCoreLocatePpi ( + Status = PeiServicesLocatePpi ( &gEfiDxeIplPpiGuid, 0, NULL,