summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Library/PeiPerformanceLib
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-29 01:52:19 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-29 01:52:19 +0000
commit6ffd3b0cd256d10b669776b56241d47839be208f (patch)
tree04b269fcfa7a08187a4376fa901f92b5859ab245 /EdkModulePkg/Library/PeiPerformanceLib
parenta3420902ba177d263a59083afb46e68fd0f0602d (diff)
downloadedk2-platforms-6ffd3b0cd256d10b669776b56241d47839be208f.tar.xz
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
Diffstat (limited to 'EdkModulePkg/Library/PeiPerformanceLib')
-rw-r--r--EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c4
-rw-r--r--EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa5
2 files changed, 7 insertions, 2 deletions
diff --git a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
index b97849fa35..dcb360c5e7 100644
--- a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
+++ b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c
@@ -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++;
diff --git a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa
index 834bd34780..90126acf91 100644
--- a/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa
+++ b/EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa
@@ -77,5 +77,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<HelpText>The bitmask of flags that specify the enable/disable of
Performance Measurement.</HelpText>
</PcdEntry>
+ <PcdEntry PcdItemType="DYNAMIC">
+ <C_Name>PcdMaxPeiPerformanceLogEntries</C_Name>
+ <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>
+ <HelpText>Maximun number of performance log entries during PEI phase.</HelpText>
+ </PcdEntry>
</PcdCoded>
</ModuleSurfaceArea> \ No newline at end of file