summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-30 04:03:59 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-30 04:03:59 +0000
commit7cff25d649a16ae039940bc4065f710453e789a2 (patch)
tree55a20896d8a92c0e3909666dd95b800ff0d3527b /MdeModulePkg/Core/Dxe
parent008d4018f6d3a17abc1e8bbafc77b7d6d1be2d54 (diff)
downloadedk2-platforms-7cff25d649a16ae039940bc4065f710453e789a2.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.h1
-rw-r--r--MdeModulePkg/Core/Dxe/Hand/DriverSupport.c2
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c9
3 files changed, 10 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index e46acf4147..13b0ee3e3d 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -79,6 +79,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DevicePathLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h>
+#include <Library/TimerLib.h>
//
// attributes for reserved memory before it is promoted to system memory
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
index 203a6e6b04..d92eef7924 100644
--- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
+++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
@@ -541,11 +541,13 @@ CoreConnectSingleController (
for (Index = 0; (Index < NumberOfSortedDriverBindingProtocols) && !DriverFound; Index++) {
if (SortedDriverBindingProtocols[Index] != NULL) {
DriverBinding = SortedDriverBindingProtocols[Index];
+ PERF_START (DriverBinding->DriverBindingHandle, DRIVERBINDING_SUPPORT_TOK, NULL, 0);
Status = DriverBinding->Supported(
DriverBinding,
ControllerHandle,
RemainingDevicePath
);
+ PERF_END (DriverBinding->DriverBindingHandle, DRIVERBINDING_SUPPORT_TOK, NULL, 0);
if (!EFI_ERROR (Status)) {
SortedDriverBindingProtocols[Index] = NULL;
DriverFound = TRUE;
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 0719d4b690..00f6bdced5 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -997,8 +997,12 @@ CoreLoadImage (
)
{
EFI_STATUS Status;
+ UINT64 Tick;
- PERF_START (NULL, "LoadImage", NULL, 0);
+ Tick = 0;
+ PERF_CODE (
+ Tick = GetPerformanceCounter ();
+ );
Status = CoreLoadImageCommon (
BootPolicy,
@@ -1013,7 +1017,8 @@ CoreLoadImage (
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;
}