diff options
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 7 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/Image.c | 30 |
4 files changed, 20 insertions, 33 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 088cd81..4c6ca76 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -419,6 +419,7 @@ CoreDispatcher ( BOOLEAN ReadyToRun;
EFI_EVENT DxeDispatchEvent;
+ PERF_FUNCTION_BEGIN ();
if (gDispatcherRunning) {
//
@@ -584,6 +585,8 @@ CoreDispatcher ( gDispatcherRunning = FALSE;
+ PERF_FUNCTION_END ();
+
return ReturnStatus;
}
@@ -1437,6 +1440,8 @@ CoreInitializeDispatcher ( VOID
)
{
+ PERF_FUNCTION_BEGIN ();
+
mFwVolEvent = EfiCreateProtocolNotifyEvent (
&gEfiFirmwareVolume2ProtocolGuid,
TPL_CALLBACK,
@@ -1444,6 +1449,8 @@ CoreInitializeDispatcher ( NULL,
&mFwVolEventRegistration
);
+
+ PERF_FUNCTION_END ();
}
//
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 07c7403..3f75373 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -301,8 +301,8 @@ DxeMain ( // Call constructor for all libraries
//
ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);
- PERF_END (NULL,"PEI", NULL, 0) ;
- PERF_START (NULL,"DXE", NULL, 0) ;
+ PERF_CROSSMODULE_END ("PEI");
+ PERF_CROSSMODULE_BEGIN ("DXE");
//
// Report DXE Core image information to the PE/COFF Extra Action Library
@@ -499,16 +499,12 @@ DxeMain ( //
// Initialize the DXE Dispatcher
//
- PERF_START (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;
CoreInitializeDispatcher ();
- PERF_END (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;
//
// Invoke the DXE Dispatcher
//
- PERF_START (NULL, "CoreDispatcher", "DxeMain", 0);
CoreDispatcher ();
- PERF_END (NULL, "CoreDispatcher", "DxeMain", 0);
//
// Display Architectural protocols that were not loaded if this is DEBUG build
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index 33dd0bd..ab3cc0c 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -627,13 +627,13 @@ CoreConnectSingleController ( for (Index = 0; (Index < NumberOfSortedDriverBindingProtocols) && !DriverFound; Index++) {
if (SortedDriverBindingProtocols[Index] != NULL) {
DriverBinding = SortedDriverBindingProtocols[Index];
- PERF_START (DriverBinding->DriverBindingHandle, "DB:Support:", NULL, 0);
+ PERF_DRIVER_BINDING_SUPPORT_BEGIN (DriverBinding->DriverBindingHandle, ControllerHandle);
Status = DriverBinding->Supported(
DriverBinding,
ControllerHandle,
RemainingDevicePath
);
- PERF_END (DriverBinding->DriverBindingHandle, "DB:Support:", NULL, 0);
+ PERF_DRIVER_BINDING_SUPPORT_END (DriverBinding->DriverBindingHandle, ControllerHandle);
if (!EFI_ERROR (Status)) {
SortedDriverBindingProtocols[Index] = NULL;
DriverFound = TRUE;
@@ -642,13 +642,13 @@ CoreConnectSingleController ( // A driver was found that supports ControllerHandle, so attempt to start the driver
// on ControllerHandle.
//
- PERF_START (DriverBinding->DriverBindingHandle, "DB:Start:", NULL, 0);
+ PERF_DRIVER_BINDING_START_BEGIN (DriverBinding->DriverBindingHandle, ControllerHandle);
Status = DriverBinding->Start (
DriverBinding,
ControllerHandle,
RemainingDevicePath
);
- PERF_END (DriverBinding->DriverBindingHandle, "DB:Start:", NULL, 0);
+ PERF_DRIVER_BINDING_START_END (DriverBinding->DriverBindingHandle, ControllerHandle);
if (!EFI_ERROR (Status)) {
//
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index c49ddfc..adeb4bf 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1436,13 +1436,9 @@ CoreLoadImage ( )
{
EFI_STATUS Status;
- UINT64 Tick;
EFI_HANDLE Handle;
- Tick = 0;
- PERF_CODE (
- Tick = GetPerformanceCounter ();
- );
+ PERF_LOAD_IMAGE_BEGIN (NULL);
Status = CoreLoadImageCommon (
BootPolicy,
@@ -1465,8 +1461,7 @@ CoreLoadImage ( Handle = *ImageHandle;
}
- PERF_START (Handle, "LoadImage:", NULL, Tick);
- PERF_END (Handle, "LoadImage:", NULL, 0);
+ PERF_LOAD_IMAGE_END (Handle);
return Status;
}
@@ -1526,13 +1521,9 @@ CoreLoadImageEx ( )
{
EFI_STATUS Status;
- UINT64 Tick;
EFI_HANDLE Handle;
- Tick = 0;
- PERF_CODE (
- Tick = GetPerformanceCounter ();
- );
+ PERF_LOAD_IMAGE_BEGIN (NULL);
Status = CoreLoadImageCommon (
TRUE,
@@ -1555,8 +1546,7 @@ CoreLoadImageEx ( Handle = *ImageHandle;
}
- PERF_START (Handle, "LoadImage:", NULL, Tick);
- PERF_END (Handle, "LoadImage:", NULL, 0);
+ PERF_LOAD_IMAGE_END (Handle);
return Status;
}
@@ -1594,10 +1584,8 @@ CoreStartImage ( LOADED_IMAGE_PRIVATE_DATA *LastImage;
UINT64 HandleDatabaseKey;
UINTN SetJumpFlag;
- UINT64 Tick;
EFI_HANDLE Handle;
- Tick = 0;
Handle = ImageHandle;
Image = CoreLoadedImageInfo (ImageHandle);
@@ -1621,9 +1609,7 @@ CoreStartImage ( return EFI_UNSUPPORTED;
}
- PERF_CODE (
- Tick = GetPerformanceCounter ();
- );
+ PERF_START_IMAGE_BEGIN (Handle);
//
@@ -1647,8 +1633,7 @@ CoreStartImage ( // Image may be unloaded after return with failure,
// then ImageHandle may be invalid, so use NULL handle to record perf log.
//
- PERF_START (NULL, "StartImage:", NULL, Tick);
- PERF_END (NULL, "StartImage:", NULL, 0);
+ PERF_START_IMAGE_END (NULL);
//
// Pop the current start image context
@@ -1763,8 +1748,7 @@ CoreStartImage ( //
// Done
//
- PERF_START (Handle, "StartImage:", NULL, Tick);
- PERF_END (Handle, "StartImage:", NULL, 0);
+ PERF_START_IMAGE_END (Handle);
return Status;
}
|