mirror of https://github.com/acidanthera/audk.git
Add Perf log for SMM driver Load and Start Image.
Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siddharth Shah <Siddharth.Shah@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13314 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
64bb20fb9c
commit
c2cb08df47
|
@ -320,6 +320,12 @@ SmmLoadImage (
|
||||||
EFI_DEVICE_PATH_PROTOCOL *HandleFilePath;
|
EFI_DEVICE_PATH_PROTOCOL *HandleFilePath;
|
||||||
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
|
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
|
||||||
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
|
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
|
||||||
|
UINT64 Tick;
|
||||||
|
|
||||||
|
Tick = 0;
|
||||||
|
PERF_CODE (
|
||||||
|
Tick = GetPerformanceCounter ();
|
||||||
|
);
|
||||||
|
|
||||||
Buffer = NULL;
|
Buffer = NULL;
|
||||||
Size = 0;
|
Size = 0;
|
||||||
|
@ -575,6 +581,9 @@ SmmLoadImage (
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
PERF_START (DriverEntry->ImageHandle, "LoadImage:", NULL, Tick);
|
||||||
|
PERF_END (DriverEntry->ImageHandle, "LoadImage:", NULL, 0);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Print the load address and the PDB file name if it is available
|
// Print the load address and the PDB file name if it is available
|
||||||
//
|
//
|
||||||
|
@ -836,7 +845,9 @@ SmmDispatcher (
|
||||||
//
|
//
|
||||||
// For each SMM driver, pass NULL as ImageHandle
|
// For each SMM driver, pass NULL as ImageHandle
|
||||||
//
|
//
|
||||||
|
PERF_START (DriverEntry->ImageHandle, "StartImage:", NULL, 0);
|
||||||
Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)DriverEntry->ImageEntryPoint)(DriverEntry->ImageHandle, gST);
|
Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)DriverEntry->ImageEntryPoint)(DriverEntry->ImageHandle, gST);
|
||||||
|
PERF_END (DriverEntry->ImageHandle, "StartImage:", NULL, 0);
|
||||||
if (EFI_ERROR(Status)){
|
if (EFI_ERROR(Status)){
|
||||||
SmmFreePages(DriverEntry->ImageBuffer, DriverEntry->NumberOfPage);
|
SmmFreePages(DriverEntry->ImageBuffer, DriverEntry->NumberOfPage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
The internal header file includes the common header files, defines
|
The internal header file includes the common header files, defines
|
||||||
internal structure and functions used by SmmCore module.
|
internal structure and functions used by SmmCore module.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/SmmCorePlatformHookLib.h>
|
#include <Library/SmmCorePlatformHookLib.h>
|
||||||
#include <Library/PerformanceLib.h>
|
#include <Library/PerformanceLib.h>
|
||||||
|
#include <Library/TimerLib.h>
|
||||||
|
|
||||||
#include "PiSmmCorePrivateData.h"
|
#include "PiSmmCorePrivateData.h"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
## @file
|
## @file
|
||||||
# This module provide an SMM CIS compliant implementation of SMM Core.
|
# This module provide an SMM CIS compliant implementation of SMM Core.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
PcdLib
|
PcdLib
|
||||||
SmmCorePlatformHookLib
|
SmmCorePlatformHookLib
|
||||||
PerformanceLib
|
PerformanceLib
|
||||||
|
TimerLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
|
Loading…
Reference in New Issue