UefiCpuPkg/S3Resume: Add more perf entry for S3 phase

V2: Just update the commit message.

Add more perf entry to hook BootScriptDonePpi/EndOfPeiPpi/
EndOfS3Resume.

Add the new perf entry with Identifier
PERF_INMODULE_START_ID/PERF_INMODULE_END_ID which are defined
in new performance infrastructure (edk2 trunk commit hash value:
SHA-1: 73fef64f14 ~
SHA-1: 115eae650b).
PERF_INMODULE_START_ID/PERF_INMODULE_END_ID are general Identifier
which are used within a module.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Bi, Dandan 2018-02-08 14:19:52 +08:00 committed by Liming Gao
parent 4109d0d754
commit 582e4e449d
1 changed files with 14 additions and 1 deletions

View File

@ -4,7 +4,7 @@
This module will execute the boot script saved during last boot and after that, This module will execute the boot script saved during last boot and after that,
control is passed to OS waking up handler. control is passed to OS waking up handler.
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR> Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
@ -23,6 +23,7 @@
#include <Guid/AcpiS3Context.h> #include <Guid/AcpiS3Context.h>
#include <Guid/BootScriptExecutorVariable.h> #include <Guid/BootScriptExecutorVariable.h>
#include <Guid/Performance.h> #include <Guid/Performance.h>
#include <Guid/ExtendedFirmwarePerformance.h>
#include <Guid/EndOfS3Resume.h> #include <Guid/EndOfS3Resume.h>
#include <Ppi/ReadOnlyVariable2.h> #include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/S3Resume2.h> #include <Ppi/S3Resume2.h>
@ -553,9 +554,13 @@ S3ResumeBootOs (
// //
// Install BootScriptDonePpi // Install BootScriptDonePpi
// //
PERF_START_EX (NULL, "BootScriptDonePpi", NULL, 0, PERF_INMODULE_START_ID);
Status = PeiServicesInstallPpi (&mPpiListPostScriptTable); Status = PeiServicesInstallPpi (&mPpiListPostScriptTable);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
PERF_END_EX (NULL, "BootScriptDonePpi", NULL, 0, PERF_INMODULE_END_ID);
// //
// Get ACPI Table Address // Get ACPI Table Address
// //
@ -578,14 +583,22 @@ S3ResumeBootOs (
// //
// Install EndOfPeiPpi // Install EndOfPeiPpi
// //
PERF_START_EX (NULL, "EndOfPeiPpi", NULL, 0, PERF_INMODULE_START_ID);
Status = PeiServicesInstallPpi (&mPpiListEndOfPeiTable); Status = PeiServicesInstallPpi (&mPpiListEndOfPeiTable);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
PERF_END_EX (NULL, "EndOfPeiPpi", NULL, 0, PERF_INMODULE_END_ID);
// //
// Signal EndOfS3Resume event. // Signal EndOfS3Resume event.
// //
PERF_START_EX (NULL, "EndOfS3Resume", NULL, 0, PERF_INMODULE_START_ID);
SignalEndOfS3Resume (); SignalEndOfS3Resume ();
PERF_END_EX (NULL, "EndOfS3Resume", NULL, 0, PERF_INMODULE_END_ID);
// //
// report status code on S3 resume // report status code on S3 resume
// //