mirror of https://github.com/acidanthera/audk.git
Performance.c in GenericBdsLib is updated not to filter log entries that don’t contain DXE handles.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9928 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
087e13cbe2
commit
b5a144ec6a
|
@ -164,6 +164,12 @@ WriteBootToOsPerformanceData (
|
|||
UINT64 StartValue;
|
||||
UINT64 EndValue;
|
||||
BOOLEAN CountUp;
|
||||
UINTN EntryIndex;
|
||||
UINTN NumPerfEntries;
|
||||
//
|
||||
// List of flags indicating PerfEntry contains DXE handle
|
||||
//
|
||||
BOOLEAN *PerfEntriesAsDxeHandle;
|
||||
|
||||
//
|
||||
// Retrieve time stamp count as early as possible
|
||||
|
@ -224,7 +230,19 @@ WriteBootToOsPerformanceData (
|
|||
Ptr = (UINT8 *) ((UINT32) mAcpiLowMemoryBase + sizeof (PERF_HEADER));
|
||||
LimitCount = (AcpiLowMemoryLength - sizeof (PERF_HEADER)) / sizeof (PERF_DATA);
|
||||
|
||||
|
||||
NumPerfEntries = 0;
|
||||
LogEntryKey = 0;
|
||||
while ((LogEntryKey = GetPerformanceMeasurement (
|
||||
LogEntryKey,
|
||||
&Handle,
|
||||
&Token,
|
||||
&Module,
|
||||
&StartTicker,
|
||||
&EndTicker)) != 0) {
|
||||
NumPerfEntries++;
|
||||
}
|
||||
PerfEntriesAsDxeHandle = AllocateZeroPool (NumPerfEntries * sizeof (BOOLEAN));
|
||||
ASSERT (PerfEntriesAsDxeHandle != NULL);
|
||||
|
||||
//
|
||||
// Get DXE drivers performance
|
||||
|
@ -232,6 +250,7 @@ WriteBootToOsPerformanceData (
|
|||
for (Index = 0; Index < NoHandles; Index++) {
|
||||
Ticker = 0;
|
||||
LogEntryKey = 0;
|
||||
EntryIndex = 0;
|
||||
while ((LogEntryKey = GetPerformanceMeasurement (
|
||||
LogEntryKey,
|
||||
&Handle,
|
||||
|
@ -239,6 +258,10 @@ WriteBootToOsPerformanceData (
|
|||
&Module,
|
||||
&StartTicker,
|
||||
&EndTicker)) != 0) {
|
||||
if (Handle == Handles[Index] && !PerfEntriesAsDxeHandle[EntryIndex]) {
|
||||
PerfEntriesAsDxeHandle[EntryIndex] = TRUE;
|
||||
}
|
||||
EntryIndex++;
|
||||
if ((Handle == Handles[Index]) && (EndTicker != 0)) {
|
||||
Ticker += CountUp ? (EndTicker - StartTicker) : (StartTicker - EndTicker);
|
||||
}
|
||||
|
@ -263,12 +286,11 @@ WriteBootToOsPerformanceData (
|
|||
}
|
||||
}
|
||||
|
||||
FreePool (Handles);
|
||||
|
||||
//
|
||||
// Get inserted performance data
|
||||
//
|
||||
LogEntryKey = 0;
|
||||
EntryIndex = 0;
|
||||
while ((LogEntryKey = GetPerformanceMeasurement (
|
||||
LogEntryKey,
|
||||
&Handle,
|
||||
|
@ -276,7 +298,7 @@ WriteBootToOsPerformanceData (
|
|||
&Module,
|
||||
&StartTicker,
|
||||
&EndTicker)) != 0) {
|
||||
if (Handle == NULL && EndTicker != 0) {
|
||||
if (!PerfEntriesAsDxeHandle[EntryIndex] && EndTicker != 0) {
|
||||
|
||||
ZeroMem (&mPerfData, sizeof (PERF_DATA));
|
||||
|
||||
|
@ -293,10 +315,14 @@ WriteBootToOsPerformanceData (
|
|||
goto Done;
|
||||
}
|
||||
}
|
||||
EntryIndex++;
|
||||
}
|
||||
|
||||
Done:
|
||||
|
||||
FreePool (Handles);
|
||||
FreePool (PerfEntriesAsDxeHandle);
|
||||
|
||||
mPerfHeader.Signiture = PERFORMANCE_SIGNATURE;
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue