]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
MdeModulePkg: Use new added Perf macros
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Hand / DriverSupport.c
index ded635632b33b175e5ce3ea2c855dd699febf712..ab3cc0c07e57b7400af148a3bb458e4fd3fab840 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support functions to connect/disconnect UEFI Driver model Protocol\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -85,6 +85,7 @@ CoreConnectController (
     //\r
     Status = CoreHandleProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);\r
     if (!EFI_ERROR (Status)) {\r
+      ASSERT (HandleFilePath != NULL);\r
       FilePath     = HandleFilePath;\r
       TempFilePath = NULL;\r
       if (RemainingDevicePath != NULL && !Recursive) {\r
@@ -415,6 +416,8 @@ CoreConnectSingleController (
   DriverBindingHandleBuffer             = NULL;\r
   NumberOfSortedDriverBindingProtocols  = 0;\r
   SortedDriverBindingProtocols          = NULL;\r
+  PlatformDriverOverride                = NULL;\r
+  NewDriverBindingHandleBuffer          = NULL;\r
 \r
   //\r
   // Get list of all Driver Binding Protocol Instances\r
@@ -624,13 +627,13 @@ CoreConnectSingleController (
     for (Index = 0; (Index < NumberOfSortedDriverBindingProtocols) && !DriverFound; Index++) {\r
       if (SortedDriverBindingProtocols[Index] != NULL) {\r
         DriverBinding = SortedDriverBindingProtocols[Index];\r
-        PERF_START (DriverBinding->DriverBindingHandle, "DB:Support:", NULL, 0);\r
+        PERF_DRIVER_BINDING_SUPPORT_BEGIN (DriverBinding->DriverBindingHandle, ControllerHandle);\r
         Status = DriverBinding->Supported(\r
                                   DriverBinding,\r
                                   ControllerHandle,\r
                                   RemainingDevicePath\r
                                   );\r
-        PERF_END (DriverBinding->DriverBindingHandle, "DB:Support:", NULL, 0);\r
+        PERF_DRIVER_BINDING_SUPPORT_END (DriverBinding->DriverBindingHandle, ControllerHandle);\r
         if (!EFI_ERROR (Status)) {\r
           SortedDriverBindingProtocols[Index] = NULL;\r
           DriverFound = TRUE;\r
@@ -639,13 +642,13 @@ CoreConnectSingleController (
           // A driver was found that supports ControllerHandle, so attempt to start the driver\r
           // on ControllerHandle.\r
           //\r
-          PERF_START (DriverBinding->DriverBindingHandle, "DB:Start:", NULL, 0);\r
+          PERF_DRIVER_BINDING_START_BEGIN (DriverBinding->DriverBindingHandle, ControllerHandle);\r
           Status = DriverBinding->Start (\r
                                     DriverBinding,\r
                                     ControllerHandle,\r
                                     RemainingDevicePath\r
                                     );\r
-          PERF_END (DriverBinding->DriverBindingHandle, "DB:Start:", NULL, 0);\r
+          PERF_DRIVER_BINDING_START_END (DriverBinding->DriverBindingHandle, ControllerHandle);\r
 \r
           if (!EFI_ERROR (Status)) {\r
             //\r