Skip to content

Commit

Permalink
MdeModulePkg/SmiHandlerProfileInfo: Include profile SMI in profile
Browse files Browse the repository at this point in the history
Includes the profiler SMI in the profile itself for completeness.

Co-authored-by: Michael Kubacki <[email protected]>
Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
2 people authored and mergify[bot] committed Jul 18, 2024
1 parent 62bf2ae commit 489e4a6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions MdeModulePkg/Core/PiSmmCore/SmiHandlerProfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
SMI handler profile support.
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -495,6 +504,8 @@ SmmReadyToLockInSmiHandlerProfile (
IN EFI_HANDLE Handle
)
{
RegisterSmiHandlerProfileHandler ();

//
// Dump all image
//
Expand Down Expand Up @@ -528,7 +539,7 @@ SmmReadyToLockInSmiHandlerProfile (

DEBUG ((DEBUG_INFO, "\n"));

RegisterSmiHandlerProfileHandler ();
BuildSmiHandlerProfileDatabase ();

if (mImageStruct != NULL) {
FreePool (mImageStruct);
Expand Down Expand Up @@ -860,7 +871,7 @@ GetSmiHandlerProfileDatabaseData (
}

/**
build SMI handler profile database.
Build SMI handler profile database.
**/
VOID
BuildSmiHandlerProfileDatabase (
Expand Down Expand Up @@ -1074,8 +1085,6 @@ RegisterSmiHandlerProfileHandler (
&DispatchHandle
);
ASSERT_EFI_ERROR (Status);

BuildSmiHandlerProfileDatabase ();
}

/**
Expand Down

0 comments on commit 489e4a6

Please sign in to comment.