summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Library
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
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')
-rw-r--r--EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c2
-rw-r--r--EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.msa5
-rw-r--r--EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c4
-rw-r--r--EdkModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.msa5
4 files changed, 13 insertions, 3 deletions
diff --git a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index 64c7454c66..268a6a04f2 100644
--- a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -438,7 +438,7 @@ DxeCorePerformanceLibConstructor (
);
ASSERT_EFI_ERROR (Status);
- mMaxGaugeRecords = INIT_DXE_GAUGE_DATA_ENTRIES + MAX_PEI_PERFORMANCE_LOG_ENTRIES;
+ mMaxGaugeRecords = INIT_DXE_GAUGE_DATA_ENTRIES + PcdGet8 (PcdMaxPeiPerformanceLogEntries);
mGaugeData = AllocateZeroPool (sizeof (GAUGE_DATA_HEADER) + (sizeof (GAUGE_DATA_ENTRY) * mMaxGaugeRecords));
ASSERT (mGaugeData != NULL);
diff --git a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.msa b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.msa
index f00b9da4a8..ab6edcb912 100644
--- a/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.msa
+++ b/EdkModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.msa
@@ -91,5 +91,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
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