summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/GenericBdsLib
diff options
context:
space:
mode:
authorjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-04 04:32:09 +0000
committerjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-04 04:32:09 +0000
commitb5a144ec6a44d82a63f156d4e83b87213a94d132 (patch)
tree00dcb78ab7c4793402686fb5f16be8cef1d40bf6 /IntelFrameworkModulePkg/Library/GenericBdsLib
parent087e13cbe2946501afcce31b62a1b342715bc20d (diff)
downloadedk2-platforms-b5a144ec6a44d82a63f156d4e83b87213a94d132.tar.xz
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
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
index 119a6e46d2..6bb60c1500 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
@@ -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;
//