diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-28 08:36:01 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-08-28 08:36:01 +0000 |
commit | b187ce9f15c2018d3ee837b873e38eacd331d5c7 (patch) | |
tree | fd78a8c19fc2931f87847793a7ff687626f7f632 /EdkModulePkg/Library/DxeCorePerformanceLib | |
parent | 4f60c26f936d5e878e9fb941f896868c6f452f18 (diff) | |
download | edk2-platforms-b187ce9f15c2018d3ee837b873e38eacd331d5c7.tar.xz |
Modify the implementation of performance library so that:
PcdPerformanceLibraryPropertyMask can turn on/off performance measurement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1395 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Library/DxeCorePerformanceLib')
-rw-r--r-- | EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index 5874902e2e..64c7454c66 100644 --- a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -236,7 +236,7 @@ StartGauge ( //
mGaugeData = CopyMem (mGaugeData, OldGaugeData, OldGaugeDataSize);
- gBS->FreePool (OldGaugeData);
+ FreePool (OldGaugeData);
}
GaugeEntryArray = (GAUGE_DATA_ENTRY *) (mGaugeData + 1);
@@ -421,6 +421,12 @@ DxeCorePerformanceLibConstructor ( {
EFI_STATUS Status;
+ if (!PerformanceMeasurementEnabled ()) {
+ //
+ // Do not initialize performance infrastructure if not required.
+ //
+ return EFI_SUCCESS;
+ }
//
// Install the protocol interfaces.
//
|