diff options
author | Bi, Dandan <dandan.bi@intel.com> | 2018-02-08 14:19:52 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-02-09 17:05:32 +0800 |
commit | 582e4e449d5ebcc2fa66faf252751b8a2b22b002 (patch) | |
tree | 23ce2b43d2ef10ab69c1284e17cc6046d6f82481 /UefiCpuPkg/Universal | |
parent | 4109d0d7547b650670f67a56daec7a31f64e3d24 (diff) | |
download | edk2-582e4e449d5ebcc2fa66faf252751b8a2b22b002.tar.gz edk2-582e4e449d5ebcc2fa66faf252751b8a2b22b002.tar.bz2 edk2-582e4e449d5ebcc2fa66faf252751b8a2b22b002.zip |
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: 73fef64f14d1b97ae9bd4705df3becc022391eba ~
SHA-1: 115eae650bfd2be2c2bc37360f4a755065e774c4).
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>
Diffstat (limited to 'UefiCpuPkg/Universal')
-rw-r--r-- | UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index b597ac7dc5..d7d2a4d1e6 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -4,7 +4,7 @@ This module will execute the boot script saved during last boot and after that,
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>
This program and the accompanying materials
@@ -23,6 +23,7 @@ #include <Guid/AcpiS3Context.h>
#include <Guid/BootScriptExecutorVariable.h>
#include <Guid/Performance.h>
+#include <Guid/ExtendedFirmwarePerformance.h>
#include <Guid/EndOfS3Resume.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/S3Resume2.h>
@@ -553,9 +554,13 @@ S3ResumeBootOs ( //
// Install BootScriptDonePpi
//
+ PERF_START_EX (NULL, "BootScriptDonePpi", NULL, 0, PERF_INMODULE_START_ID);
+
Status = PeiServicesInstallPpi (&mPpiListPostScriptTable);
ASSERT_EFI_ERROR (Status);
+ PERF_END_EX (NULL, "BootScriptDonePpi", NULL, 0, PERF_INMODULE_END_ID);
+
//
// Get ACPI Table Address
//
@@ -578,14 +583,22 @@ S3ResumeBootOs ( //
// Install EndOfPeiPpi
//
+ PERF_START_EX (NULL, "EndOfPeiPpi", NULL, 0, PERF_INMODULE_START_ID);
+
Status = PeiServicesInstallPpi (&mPpiListEndOfPeiTable);
ASSERT_EFI_ERROR (Status);
+ PERF_END_EX (NULL, "EndOfPeiPpi", NULL, 0, PERF_INMODULE_END_ID);
+
//
// Signal EndOfS3Resume event.
//
+ PERF_START_EX (NULL, "EndOfS3Resume", NULL, 0, PERF_INMODULE_START_ID);
+
SignalEndOfS3Resume ();
+ PERF_END_EX (NULL, "EndOfS3Resume", NULL, 0, PERF_INMODULE_END_ID);
+
//
// report status code on S3 resume
//
|