diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-10 07:30:40 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-10 07:30:40 +0000 |
commit | 217f1d11c3767575a5c26f89cedb765caaeecc4f (patch) | |
tree | 2664576bd1e608014c1fc723e31182527a5570dc /EdkModulePkg | |
parent | e57b8d71a478c2f30d11f71a281a173693e42380 (diff) | |
download | edk2-217f1d11c3767575a5c26f89cedb765caaeecc4f.tar.gz edk2-217f1d11c3767575a5c26f89cedb765caaeecc4f.tar.bz2 edk2-217f1d11c3767575a5c26f89cedb765caaeecc4f.zip |
Add pair of performance macro function to measure the whole PEI phase's performance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1704 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg')
-rw-r--r-- | EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c | 2 | ||||
-rw-r--r-- | EdkModulePkg/Core/Pei/PeiMain/PeiMain.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c index db25fcfa8d..5e5b95af38 100644 --- a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -423,7 +423,7 @@ Returns: // Call constructor for all libraries
//
ProcessLibraryConstructorList (gDxeCoreImageHandle, gST);
-
+ PERF_END (0,PEI_TOK, NULL, 0) ;
PERF_START (0,DXE_TOK, NULL, 0) ;
//
diff --git a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c index c94331c010..924336b22d 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,"PEI", NULL, mTick);
PERF_START (NULL,"DisMem", NULL, 0);
Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi);
PERF_END (NULL,"DisMem", NULL, 0);
|