VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Include/Guid/PerformanceMeasurement.h

最後變更 在這個檔案是 99404,由 vboxsync 提交於 2 年 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.1 KB
 
1/** @file
2
3Performance measurement protocol, allows logging performance data.
4
5Copyright (c) 2017, Microsoft Corporation<BR>
6Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
7SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#ifndef _PERFORMANCE_MEASUREMENT_H_
12#define _PERFORMANCE_MEASUREMENT_H_
13
14//
15// GUID for Performance measurement Protocol
16//
17#define PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
18 { 0xc85d06be, 0x5f75, 0x48ce, {0xa8, 0x0f, 0x12, 0x36, 0xba, 0x3b, 0x87, 0xb1 } }
19
20#define SMM_PERFORMANCE_MEASUREMENT_PROTOCOL_GUID \
21 { 0xd56b6d73, 0x1a7b, 0x4015, {0x9b, 0xb4, 0x7b, 0x07, 0x17, 0x29, 0xed, 0x24 } }
22
23typedef struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL;
24
25typedef enum {
26 PerfStartEntry, // used in StartPerformanceMeasurement()/StartPerformanceMeasurementEx()
27 // (map to PERF_START/PERF_START_EX)
28 PerfEndEntry, // used in EndPerformanceMeasurement()/EndPerformanceMeasurementEx()
29 // (map to PERF_END/PERF_END_EX)
30 PerfEntry // used in LogPerformanceMeasurement()
31 // (map to other Perf macros except above 4 macros)
32} PERF_MEASUREMENT_ATTRIBUTE;
33
34/**
35 Create performance record with event description and a timestamp.
36
37 @param CallerIdentifier - Image handle or pointer to caller ID GUID.
38 @param Guid - Pointer to a GUID.
39 @param String - Pointer to a string describing the measurement.
40 @param TimeStamp - 64-bit time stamp.
41 @param Address - Pointer to a location in memory relevant to the measurement.
42 @param Identifier - Performance identifier describing the type of measurement.
43 @param Attribute - The attribute of the measurement. According to attribute can create a start
44 record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
45 or a general record for other Perf macros.
46
47 @retval EFI_SUCCESS - Successfully created performance record.
48 @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
49 @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
50 pointer or invalid PerfId.
51
52**/
53typedef
54EFI_STATUS
55(EFIAPI *CREATE_PERFORMANCE_MEASUREMENT)(
56 IN CONST VOID *CallerIdentifier OPTIONAL,
57 IN CONST VOID *Guid OPTIONAL,
58 IN CONST CHAR8 *String OPTIONAL,
59 IN UINT64 TimeStamp OPTIONAL,
60 IN UINT64 Address OPTIONAL,
61 IN UINT32 Identifier,
62 IN PERF_MEASUREMENT_ATTRIBUTE Attribute
63 );
64
65struct _EDKII_PERFORMANCE_MEASUREMENT_PROTOCOL {
66 CREATE_PERFORMANCE_MEASUREMENT CreatePerformanceMeasurement;
67};
68
69extern EFI_GUID gEdkiiPerformanceMeasurementProtocolGuid;
70extern EFI_GUID gEdkiiSmmPerformanceMeasurementProtocolGuid;
71
72#endif // _PERFORMANCE_MEASUREMENT_H_
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette