UefiCpuPkg/CpuSmm: Add perf-logging for time-consuming BSP procedures
The patch adds perf-logging for the following potential time-consuming BSP procedures: * PiCpuSmmEntry - SmmRelocateBases - ExecuteFirstSmiInit * BSPHandler - SmmWaitForApArrival - PerformRemainingTasks * InitPaging * SetMemMapAttributes * SetUefiMemMapAttributes * SetPageTableAttributes * ConfigSmmCodeAccessCheck * SmmCpuFeaturesCompleteSmmReadyToLock Signed-off-by: Ray Ni <ray.ni@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:
@@ -351,6 +351,8 @@ SmmWaitForApArrival (
|
||||
UINT32 DelayedCount;
|
||||
UINT32 BlockedCount;
|
||||
|
||||
PERF_FUNCTION_BEGIN ();
|
||||
|
||||
DelayedCount = 0;
|
||||
BlockedCount = 0;
|
||||
|
||||
@@ -439,7 +441,7 @@ SmmWaitForApArrival (
|
||||
DEBUG ((DEBUG_INFO, "SmmWaitForApArrival: Delayed AP Count = %d, Blocked AP Count = %d\n", DelayedCount, BlockedCount));
|
||||
}
|
||||
|
||||
return;
|
||||
PERF_FUNCTION_END ();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -577,6 +579,8 @@ BSPHandler (
|
||||
ASSERT (CpuIndex == mSmmMpSyncData->BspIndex);
|
||||
ApCount = 0;
|
||||
|
||||
PERF_FUNCTION_BEGIN ();
|
||||
|
||||
//
|
||||
// Flag BSP's presence
|
||||
//
|
||||
@@ -792,6 +796,8 @@ BSPHandler (
|
||||
*mSmmMpSyncData->Counter = 0;
|
||||
*mSmmMpSyncData->AllCpusInSync = FALSE;
|
||||
mSmmMpSyncData->AllApArrivedWithException = FALSE;
|
||||
|
||||
PERF_FUNCTION_END ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user