Measure time spent in Driver Binding Supported() calls

Update time measurement of StartImage() calls to properly record the handle of the started Image


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6292 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2008-10-30 04:03:59 +00:00
parent 008d4018f6
commit 7cff25d649
3 changed files with 10 additions and 2 deletions

View File

@ -79,6 +79,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DevicePathLib.h> #include <Library/DevicePathLib.h>
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h> #include <Library/ReportStatusCodeLib.h>
#include <Library/TimerLib.h>
// //
// attributes for reserved memory before it is promoted to system memory // attributes for reserved memory before it is promoted to system memory

View File

@ -541,11 +541,13 @@ CoreConnectSingleController (
for (Index = 0; (Index < NumberOfSortedDriverBindingProtocols) && !DriverFound; Index++) { for (Index = 0; (Index < NumberOfSortedDriverBindingProtocols) && !DriverFound; Index++) {
if (SortedDriverBindingProtocols[Index] != NULL) { if (SortedDriverBindingProtocols[Index] != NULL) {
DriverBinding = SortedDriverBindingProtocols[Index]; DriverBinding = SortedDriverBindingProtocols[Index];
PERF_START (DriverBinding->DriverBindingHandle, DRIVERBINDING_SUPPORT_TOK, NULL, 0);
Status = DriverBinding->Supported( Status = DriverBinding->Supported(
DriverBinding, DriverBinding,
ControllerHandle, ControllerHandle,
RemainingDevicePath RemainingDevicePath
); );
PERF_END (DriverBinding->DriverBindingHandle, DRIVERBINDING_SUPPORT_TOK, NULL, 0);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
SortedDriverBindingProtocols[Index] = NULL; SortedDriverBindingProtocols[Index] = NULL;
DriverFound = TRUE; DriverFound = TRUE;

View File

@ -997,8 +997,12 @@ CoreLoadImage (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINT64 Tick;
PERF_START (NULL, "LoadImage", NULL, 0); Tick = 0;
PERF_CODE (
Tick = GetPerformanceCounter ();
);
Status = CoreLoadImageCommon ( Status = CoreLoadImageCommon (
BootPolicy, BootPolicy,
@ -1013,7 +1017,8 @@ CoreLoadImage (
EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION | EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION | EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION
); );
PERF_END (NULL, "LoadImage", NULL, 0); PERF_START (*ImageHandle, LOAD_IMAGE_TOK, NULL, Tick);
PERF_END (*ImageHandle, LOAD_IMAGE_TOK, NULL, 0);
return Status; return Status;
} }