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
This commit is contained in:
qhuang8
2006-08-28 08:36:01 +00:00
parent 4f60c26f93
commit b187ce9f15
3 changed files with 40 additions and 16 deletions

View File

@@ -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.
//