]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update for the performance infrastructure changes:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 03:15:57 +0000 (03:15 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 03:15:57 +0000 (03:15 +0000)
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

IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c

index bc0904e84eaba8bf7950bfce1ec5c7ec9c2c8bbd..f80f36ffc8841dcce4d82adb76774d3c86a19b19 100644 (file)
@@ -150,7 +150,7 @@ BdsLibBootViaBootOption (
   //\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
index 9ed96973b889e052ec4aa5c634d6ec372f605b1b..4921ab990f5ed9aa303e1f288a6ad6c9b202e074 100644 (file)
@@ -84,7 +84,7 @@
                                                 ## 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
index cb11b6e02d42791ea6c774585d00a65b1dadeb97..49a67b21f4961633127afdf7e602c47f9d62b749 100644 (file)
@@ -33,7 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
@@ -42,14 +41,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiFont.h>\r
 #include <Protocol/HiiImage.h>\r
 \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/GenericPlatformVariable.h>\r
 #include <Guid/Bmp.h>\r
+#include <Guid/Performance.h>\r
 \r
 #include <Library/PrintLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -71,26 +69,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
 \r
 /**\r
 \r
index 0e3f7936cd78de7b7ad9cc77a7a63ec253020411..6fbb12b7c324bfbb8077a9f15fa7ba44be9f5903 100644 (file)
@@ -166,7 +166,7 @@ WriteBootToOsPerformanceData (
   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
@@ -306,7 +306,7 @@ Done:
 \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