UefiCpuPkg/SmmCpu: Add PcdSmmApPerfLogEnable control AP perf-logging
When a platform has lots of CPU cores/threads, perf-logging on every AP produces lots of records. When this multiplies with number of SMIs during post, the records are even more. So, this patch adds a new PCD PcdSmmApPerfLogEnable (default TRUE) to allow platform to turn off perf-logging on APs. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
@@ -38,16 +38,25 @@ InitializeMpPerf (
|
||||
Migrate MP performance data to standardized performance database.
|
||||
|
||||
@param NumberofCpus Number of processors in the platform.
|
||||
@param BspIndex The index of the BSP.
|
||||
**/
|
||||
VOID
|
||||
MigrateMpPerf (
|
||||
UINTN NumberofCpus
|
||||
UINTN NumberofCpus,
|
||||
UINTN BspIndex
|
||||
)
|
||||
{
|
||||
UINTN CpuIndex;
|
||||
UINTN MpProcecureId;
|
||||
|
||||
for (CpuIndex = 0; CpuIndex < NumberofCpus; CpuIndex++) {
|
||||
if ((CpuIndex != BspIndex) && !FeaturePcdGet (PcdSmmApPerfLogEnable)) {
|
||||
//
|
||||
// Skip migrating AP performance data if AP perf-logging is disabled.
|
||||
//
|
||||
continue;
|
||||
}
|
||||
|
||||
for (MpProcecureId = 0; MpProcecureId < SMM_MP_PERF_PROCEDURE_ID (SmmMpProcedureMax); MpProcecureId++) {
|
||||
if (mSmmMpProcedurePerformance[CpuIndex].Begin[MpProcecureId] != 0) {
|
||||
PERF_START (NULL, gSmmMpPerfProcedureName[MpProcecureId], NULL, mSmmMpProcedurePerformance[CpuIndex].Begin[MpProcecureId]);
|
||||
|
Reference in New Issue
Block a user