UefiCpuPkg/CpuSmm: Add perf-logging for MP procedures
MP procedures are those procedures that run in every CPU thread. The EDKII perf infra is not MP safe so it doesn't support to be called from those MP procedures. The patch adds SMM MP perf-logging support in SmmMpPerf.c. The following procedures are perf-logged: * SmmInitHandler * SmmCpuFeaturesRendezvousEntry * PlatformValidSmi * SmmCpuFeaturesRendezvousExit 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> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
@@ -362,6 +362,9 @@ SmmInitHandler (
|
||||
|
||||
for (Index = 0; Index < mNumberOfCpus; Index++) {
|
||||
if (ApicId == (UINT32)gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId) {
|
||||
PERF_CODE (
|
||||
MpPerfBegin (Index, SMM_MP_PERF_PROCEDURE_ID (SmmInitHandler));
|
||||
);
|
||||
//
|
||||
// Initialize SMM specific features on the currently executing CPU
|
||||
//
|
||||
@@ -392,6 +395,10 @@ SmmInitHandler (
|
||||
SemaphoreHook (Index, &mRebased[Index]);
|
||||
}
|
||||
|
||||
PERF_CODE (
|
||||
MpPerfEnd (Index, SMM_MP_PERF_PROCEDURE_ID (SmmInitHandler));
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -699,6 +706,10 @@ PiCpuSmmEntry (
|
||||
|
||||
gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus = mMaxNumberOfCpus;
|
||||
|
||||
PERF_CODE (
|
||||
InitializeMpPerf (gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus);
|
||||
);
|
||||
|
||||
//
|
||||
// The CPU save state and code for the SMI entry point are tiled within an SMRAM
|
||||
// allocated buffer. The minimum size of this buffer for a uniprocessor system
|
||||
|
Reference in New Issue
Block a user