]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Library / DxeCorePerformanceLib / DxeCorePerformanceLibInternal.h
1 /** @file
2 Master header files for DxeCorePerformanceLib instance.
3
4 This header file holds the prototypes of the Performance and PerformanceEx Protocol published by this
5 library instance at its constructor.
6
7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 **/
11
12 #ifndef _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
13 #define _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
14
15
16 #include <PiDxe.h>
17
18 #include <Guid/Performance.h>
19 #include <Guid/PerformanceMeasurement.h>
20 #include <Guid/ExtendedFirmwarePerformance.h>
21 #include <Guid/ZeroGuid.h>
22 #include <Guid/EventGroup.h>
23 #include <Guid/FirmwarePerformance.h>
24 #include <Guid/PiSmmCommunicationRegionTable.h>
25
26 #include <Protocol/DriverBinding.h>
27 #include <Protocol/LoadedImage.h>
28 #include <Protocol/ComponentName2.h>
29 #include <Protocol/DevicePathToText.h>
30 #include <Protocol/SmmCommunication.h>
31
32 #include <Library/PerformanceLib.h>
33 #include <Library/DebugLib.h>
34 #include <Library/HobLib.h>
35 #include <Library/BaseLib.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/TimerLib.h>
38 #include <Library/PcdLib.h>
39 #include <Library/DevicePathLib.h>
40 #include <Library/UefiBootServicesTableLib.h>
41 #include <Library/UefiRuntimeServicesTableLib.h>
42 #include <Library/MemoryAllocationLib.h>
43 #include <Library/UefiLib.h>
44 #include <Library/ReportStatusCodeLib.h>
45 #include <Library/DxeServicesLib.h>
46 #include <Library/PeCoffGetEntryPointLib.h>
47
48 /**
49 Create performance record with event description and a timestamp.
50
51 @param CallerIdentifier - Image handle or pointer to caller ID GUID.
52 @param Guid - Pointer to a GUID.
53 @param String - Pointer to a string describing the measurement.
54 @param TimeStamp - 64-bit time stamp.
55 @param Address - Pointer to a location in memory relevant to the measurement.
56 @param Identifier - Performance identifier describing the type of measurement.
57 @param Attribute - The attribute of the measurement. According to attribute can create a start
58 record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
59 or a general record for other Perf macros.
60
61 @retval EFI_SUCCESS - Successfully created performance record.
62 @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
63 @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
64 pointer or invalid PerfId.
65 **/
66 EFI_STATUS
67 EFIAPI
68 CreatePerformanceMeasurement(
69 IN CONST VOID *CallerIdentifier, OPTIONAL
70 IN CONST VOID *Guid, OPTIONAL
71 IN CONST CHAR8 *String, OPTIONAL
72 IN UINT64 TimeStamp, OPTIONAL
73 IN UINT64 Address, OPTIONAL
74 IN UINT32 Identifier,
75 IN PERF_MEASUREMENT_ATTRIBUTE Attribute
76 );
77
78 #endif