]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h
MdeModulePkg: Update Performance instances to use new protocol
[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 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 **/
17
18 #ifndef _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
19 #define _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_
20
21
22 #include <PiDxe.h>
23
24 #include <Guid/Performance.h>
25 #include <Guid/PerformanceMeasurement.h>
26 #include <Guid/ExtendedFirmwarePerformance.h>
27 #include <Guid/ZeroGuid.h>
28 #include <Guid/EventGroup.h>
29 #include <Guid/FirmwarePerformance.h>
30 #include <Guid/PiSmmCommunicationRegionTable.h>
31
32 #include <Protocol/DriverBinding.h>
33 #include <Protocol/LoadedImage.h>
34 #include <Protocol/ComponentName2.h>
35 #include <Protocol/DevicePathToText.h>
36 #include <Protocol/SmmCommunication.h>
37
38 #include <Library/PerformanceLib.h>
39 #include <Library/DebugLib.h>
40 #include <Library/HobLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/BaseMemoryLib.h>
43 #include <Library/TimerLib.h>
44 #include <Library/PcdLib.h>
45 #include <Library/UefiBootServicesTableLib.h>
46 #include <Library/UefiRuntimeServicesTableLib.h>
47 #include <Library/MemoryAllocationLib.h>
48 #include <Library/UefiLib.h>
49 #include <Library/ReportStatusCodeLib.h>
50 #include <Library/DxeServicesLib.h>
51 #include <Library/PeCoffGetEntryPointLib.h>
52
53 /**
54 Create performance record with event description and a timestamp.
55
56 @param CallerIdentifier - Image handle or pointer to caller ID GUID.
57 @param Guid - Pointer to a GUID.
58 @param String - Pointer to a string describing the measurement.
59 @param TimeStamp - 64-bit time stamp.
60 @param Address - Pointer to a location in memory relevant to the measurement.
61 @param Identifier - Performance identifier describing the type of measurement.
62 @param Attribute - The attribute of the measurement. According to attribute can create a start
63 record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
64 or a general record for other Perf macros.
65
66 @retval EFI_SUCCESS - Successfully created performance record.
67 @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
68 @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
69 pointer or invalid PerfId.
70 **/
71 EFI_STATUS
72 EFIAPI
73 CreatePerformanceMeasurement(
74 IN CONST VOID *CallerIdentifier, OPTIONAL
75 IN CONST VOID *Guid, OPTIONAL
76 IN CONST CHAR8 *String, OPTIONAL
77 IN UINT64 TimeStamp, OPTIONAL
78 IN UINT64 Address, OPTIONAL
79 IN UINT32 Identifier,
80 IN PERF_MEASUREMENT_ATTRIBUTE Attribute
81 );
82
83 #endif