summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Library/DxeCorePerformanceLib
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-28 08:36:01 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-28 08:36:01 +0000
commitb187ce9f15c2018d3ee837b873e38eacd331d5c7 (patch)
treefd78a8c19fc2931f87847793a7ff687626f7f632 /EdkModulePkg/Library/DxeCorePerformanceLib
parent4f60c26f936d5e878e9fb941f896868c6f452f18 (diff)
downloadedk2-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.c8
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.
//