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:
@@ -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.
|
||||
//
|
||||
|
Reference in New Issue
Block a user