summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6aa22a1)
1. Use raw string for performance tokens
2. Reuse gPerformanceProtocolGuid as performance variable paring GUID
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7576
6f19259b-4bc3-4df7-8a09-
765794883524
//\r
// Record the performance data for End of BDS\r
//\r
//\r
// Record the performance data for End of BDS\r
//\r
- PERF_END (0, BDS_TOK, NULL, 0);\r
+ PERF_END (0, "BDS", NULL, 0);\r
\r
*ExitDataSize = 0;\r
*ExitData = NULL;\r
\r
*ExitDataSize = 0;\r
*ExitData = NULL;\r
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
gEfiFileInfoGuid ## CONSUMES ## GUID\r
gEfiPcAnsiGuid ## CONSUMES ## GUID (The type of terminal)\r
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
gEfiFileInfoGuid ## CONSUMES ## GUID\r
gEfiPcAnsiGuid ## CONSUMES ## GUID (The type of terminal)\r
- gEfiGenericPlatformVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
+ gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" (The ACPI address of performance data)\r
gEfiUartDevicePathGuid ## CONSUMES ## GUID (Identify the device path for UARD device)\r
gEfiSasDevicePathGuid ## CONSUMES ## GUID (Identify the device path for SAS device)\r
\r
gEfiUartDevicePathGuid ## CONSUMES ## GUID (Identify the device path for UARD device)\r
gEfiSasDevicePathGuid ## CONSUMES ## GUID (Identify the device path for SAS device)\r
\r
#include <Protocol/FirmwareVolume2.h>\r
#include <Protocol/PciIo.h>\r
#include <Protocol/AcpiS3Save.h>\r
#include <Protocol/FirmwareVolume2.h>\r
#include <Protocol/PciIo.h>\r
#include <Protocol/AcpiS3Save.h>\r
-#include <Protocol/Performance.h>\r
#include <Protocol/FirmwareVolumeDispatch.h>\r
#include <Protocol/OEMBadging.h>\r
#include <Protocol/ConsoleControl.h>\r
#include <Protocol/FirmwareVolumeDispatch.h>\r
#include <Protocol/OEMBadging.h>\r
#include <Protocol/ConsoleControl.h>\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/HiiImage.h>\r
\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/HiiImage.h>\r
\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
#include <Guid/PcAnsi.h>\r
#include <Guid/ShellFile.h>\r
#include <Guid/MemoryTypeInformation.h>\r
#include <Guid/FileInfo.h>\r
#include <Guid/GlobalVariable.h>\r
#include <Guid/PcAnsi.h>\r
#include <Guid/ShellFile.h>\r
-#include <Guid/GenericPlatformVariable.h>\r
+#include <Guid/Performance.h>\r
\r
#include <Library/PrintLib.h>\r
#include <Library/DebugLib.h>\r
\r
#include <Library/PrintLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/DxeServicesLib.h>\r
\r
#include <Library/PcdLib.h>\r
#include <Library/DxeServicesLib.h>\r
\r
-#define PERFORMANCE_SIGNATURE SIGNATURE_32 ('P', 'e', 'r', 'f')\r
-#define PERF_TOKEN_SIZE 28\r
-#define PERF_TOKEN_LENGTH (PERF_TOKEN_SIZE - 1)\r
-#define PERF_PEI_ENTRY_MAX_NUM 50\r
-\r
-typedef struct {\r
- CHAR8 Token[PERF_TOKEN_SIZE];\r
- UINT32 Duration;\r
-} PERF_DATA;\r
-\r
-typedef struct {\r
- UINT64 BootToOs;\r
- UINT64 S3Resume;\r
- UINT32 S3EntryNum;\r
- PERF_DATA S3Entry[PERF_PEI_ENTRY_MAX_NUM];\r
- UINT64 CpuFreq;\r
- UINT64 BDSRaw;\r
- UINT32 Count;\r
- UINT32 Signiture;\r
-} PERF_HEADER;\r
BOOLEAN CountUp;\r
\r
//\r
BOOLEAN CountUp;\r
\r
//\r
- // Retrive time stamp count as early as possilbe\r
+ // Retrieve time stamp count as early as possible\r
//\r
Ticker = GetPerformanceCounter ();\r
\r
//\r
Ticker = GetPerformanceCounter ();\r
\r
\r
gRT->SetVariable (\r
L"PerfDataMemAddr",\r
\r
gRT->SetVariable (\r
L"PerfDataMemAddr",\r
- &gEfiGenericPlatformVariableGuid,\r
+ &gPerformanceProtocolGuid,\r
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
sizeof (EFI_PHYSICAL_ADDRESS),\r
&AcpiLowMemoryBase\r
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
sizeof (EFI_PHYSICAL_ADDRESS),\r
&AcpiLowMemoryBase\r