From 489e4a60ea88326a07a7cee8086227c3df2bf93d Mon Sep 17 00:00:00 2001 From: Bret Barkelew Date: Fri, 19 Jan 2018 12:30:14 -0800 Subject: [PATCH] MdeModulePkg/SmiHandlerProfileInfo: Include profile SMI in profile Includes the profiler SMI in the profile itself for completeness. Co-authored-by: Michael Kubacki Signed-off-by: Michael Kubacki --- MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c b/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c index 27da2898dd25..e48532c0fb79 100644 --- a/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c +++ b/MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c @@ -2,6 +2,7 @@ SMI handler profile support. Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -47,6 +48,14 @@ RegisterSmiHandlerProfileHandler ( VOID ); +/** + Build SMI handler profile database. +**/ +VOID +BuildSmiHandlerProfileDatabase ( + VOID + ); + /** Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded into system memory with the PE/COFF Loader Library functions. @@ -495,6 +504,8 @@ SmmReadyToLockInSmiHandlerProfile ( IN EFI_HANDLE Handle ) { + RegisterSmiHandlerProfileHandler (); + // // Dump all image // @@ -528,7 +539,7 @@ SmmReadyToLockInSmiHandlerProfile ( DEBUG ((DEBUG_INFO, "\n")); - RegisterSmiHandlerProfileHandler (); + BuildSmiHandlerProfileDatabase (); if (mImageStruct != NULL) { FreePool (mImageStruct); @@ -860,7 +871,7 @@ GetSmiHandlerProfileDatabaseData ( } /** - build SMI handler profile database. + Build SMI handler profile database. **/ VOID BuildSmiHandlerProfileDatabase ( @@ -1074,8 +1085,6 @@ RegisterSmiHandlerProfileHandler ( &DispatchHandle ); ASSERT_EFI_ERROR (Status); - - BuildSmiHandlerProfileDatabase (); } /**