Add a Pcd to define the maximum number of performance log entries during PEI phase.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1398 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2006-08-29 01:52:19 +00:00
parent a3420902ba
commit 6ffd3b0cd2
6 changed files with 22 additions and 7 deletions

View File

@ -57,7 +57,7 @@ InternalGetPerformanceHobLog (
// PEI Performance HOB was not found, then build one.
//
PeiPerformanceLogSize = sizeof (PEI_PERFORMANCE_LOG_HEADER) +
sizeof (PEI_PERFORMANCE_LOG_ENTRY) * MAX_PEI_PERFORMANCE_LOG_ENTRIES;
sizeof (PEI_PERFORMANCE_LOG_ENTRY) * PcdGet8 (PcdMaxPeiPerformanceLogEntries);
PeiPerformanceLog = BuildGuidHob (&gPeiPerformanceHobGuid, PeiPerformanceLogSize);
PeiPerformanceLog = ZeroMem (PeiPerformanceLog, PeiPerformanceLogSize);
}
@ -152,7 +152,7 @@ StartPerformanceMeasurement (
PeiPerformanceLog = InternalGetPerformanceHobLog ();
if (PeiPerformanceLog->NumberOfEntries >= MAX_PEI_PERFORMANCE_LOG_ENTRIES) {
if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) {
return RETURN_OUT_OF_RESOURCES;
}
Index = PeiPerformanceLog->NumberOfEntries++;