]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Include/EfiPerf.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Include / EfiPerf.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 EfiPerf.h
15
16 Abstract:
17 EfiPerf.h provides performance primitive for the DXE and Shell phase
18
19
20 --*/
21
22 #ifndef _EFI_PERF_H_
23 #define _EFI_PERF_H_
24
25 #include EFI_PROTOCOL_DEFINITION (Performance)
26
27 EFI_STATUS
28 InitializePerformanceInfrastructure (
29 IN EFI_HANDLE ImageHandle,
30 IN EFI_SYSTEM_TABLE *SystemTable,
31 IN UINT64 Ticker
32 )
33 /*++
34
35 Routine Description:
36
37 TODO: Add function description
38
39 Arguments:
40
41 ImageHandle - TODO: add argument description
42 SystemTable - TODO: add argument description
43 Ticker - TODO: add argument description
44
45 Returns:
46
47 TODO: add return values
48
49 --*/
50 ;
51
52 EFI_STATUS
53 EndMeasure (
54 IN EFI_HANDLE Handle,
55 IN UINT16 *Token,
56 IN UINT16 *Host,
57 IN UINT64 Ticker
58 )
59 /*++
60
61 Routine Description:
62
63 TODO: Add function description
64
65 Arguments:
66
67 Handle - TODO: add argument description
68 Token - TODO: add argument description
69 Host - TODO: add argument description
70 Ticker - TODO: add argument description
71
72 Returns:
73
74 TODO: add return values
75
76 --*/
77 ;
78
79 EFI_STATUS
80 StartMeasure (
81 IN EFI_HANDLE Handle,
82 IN UINT16 *Token,
83 IN UINT16 *Host,
84 IN UINT64 Ticker
85 )
86 /*++
87
88 Routine Description:
89
90 TODO: Add function description
91
92 Arguments:
93
94 Handle - TODO: add argument description
95 Token - TODO: add argument description
96 Host - TODO: add argument description
97 Ticker - TODO: add argument description
98
99 Returns:
100
101 TODO: add return values
102
103 --*/
104 ;
105
106 EFI_STATUS
107 UpdateMeasure (
108 IN EFI_HANDLE Handle,
109 IN UINT16 *Token,
110 IN UINT16 *Host,
111 IN EFI_HANDLE HandleNew,
112 IN UINT16 *TokenNew,
113 IN UINT16 *HostNew
114 )
115 /*++
116
117 Routine Description:
118
119 TODO: Add function description
120
121 Arguments:
122
123 Handle - TODO: add argument description
124 Token - TODO: add argument description
125 Host - TODO: add argument description
126 HandleNew - TODO: add argument description
127 TokenNew - TODO: add argument description
128 HostNew - TODO: add argument description
129
130 Returns:
131
132 TODO: add return values
133
134 --*/
135 ;
136
137 #ifdef EFI_DXE_PERFORMANCE
138 #define PERF_ENABLE(handle, table, ticker) InitializePerformanceInfrastructure (handle, table, ticker)
139 #define PERF_START(handle, token, host, ticker) StartMeasure (handle, token, host, ticker)
140 #define PERF_END(handle, token, host, ticker) EndMeasure (handle, token, host, ticker)
141 #define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew) \
142 UpdateMeasure (handle, \
143 token, \
144 host, \
145 handlenew, \
146 tokennew, \
147 hostnew \
148 )
149 #define PERF_CODE(code) code
150 #else
151 #define PERF_ENABLE(handle, table, ticker)
152 #define PERF_START(handle, token, host, ticker)
153 #define PERF_END(handle, token, host, ticker)
154 #define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew)
155 #define PERF_CODE(code)
156 #endif
157
158 #endif