TianoCore EDK2 master
Loading...
Searching...
No Matches
Dp.h
Go to the documentation of this file.
1
9#ifndef _DP_H_
10#define _DP_H_
11
12#include <Uefi.h>
13
14#include <Guid/Performance.h>
17
19#include <Protocol/DevicePath.h>
22
23#include <Library/BaseLib.h>
25#include <Library/DebugLib.h>
27#include <Library/ShellLib.h>
28#include <Library/UefiLib.h>
31#include <Library/PcdLib.h>
32#include <Library/SortLib.h>
33#include <Library/HiiLib.h>
37
39
40#define DP_MAJOR_VERSION 2
41#define DP_MINOR_VERSION 5
42
47#define DP_DEBUG 0
48
49#define DEFAULT_THRESHOLD 1000
50#define DEFAULT_DISPLAYCOUNT 50
51#define MAXIMUM_DISPLAYCOUNT 999999
52
53#define PERF_MAXDUR 0xFFFFFFFFFFFFFFFFULL
54
56#define WITHIN_LIMIT(C, L) ( ((L) == 0) || ((C) < (L)) )
57
59typedef struct {
60 UINT64 StartCount;
61 UINT64 EndCount;
62 UINT32 Frequency;
63 BOOLEAN CountUp;
65
75#define PERF_INIT_CUM_DATA(t) { 0ULL, PERF_MAXDUR, 0ULL, (t), 0U }
76
77typedef struct {
78 UINT64 Duration;
79 UINT64 MinDur;
80 UINT64 MaxDur;
81 CHAR8 *Name;
82 UINT32 Count;
84
85typedef struct {
86 UINT32 NumTrace;
88 UINT32 NumSummary;
89 UINT32 NumHandles;
90 UINT32 NumPEIMs;
91 UINT32 NumGlobal;
93
94typedef struct {
95 CONST VOID *Handle;
96 CONST CHAR8 *Token;
97 CONST CHAR8 *Module;
99 UINT64 EndTimeStamp;
100 UINT32 Identifier;
102
103typedef struct {
104 CHAR8 *Name;
106 UINT64 MinTime;
107 UINT64 MaxTime;
108 UINT32 Count;
110
123RunDp (
124 IN EFI_HANDLE ImageHandle,
125 IN EFI_SYSTEM_TABLE *SystemTable
126 );
127
137 EFI_HANDLE ImageHandle
138 );
139
140#endif // _DP_H_
EFI_HII_HANDLE mDpHiiHandle
Definition: Dp.c:39
EFI_HII_HANDLE InitializeHiiPackage(EFI_HANDLE ImageHandle)
SHELL_STATUS RunDp(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Dp.c:670
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
SHELL_STATUS
Definition: Shell.h:21
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
VOID * EFI_HII_HANDLE
UINT32 Identifier
Identifier.
Definition: Dp.h:100
CONST CHAR8 * Module
Module string name.
Definition: Dp.h:97
UINT64 StartTimeStamp
Start time point.
Definition: Dp.h:98
CONST CHAR8 * Token
Measured token string name.
Definition: Dp.h:96
UINT64 EndTimeStamp
End time point.
Definition: Dp.h:99
UINT64 MaxDur
Largest duration encountered.
Definition: Dp.h:80
UINT64 MinDur
Smallest duration encountered.
Definition: Dp.h:79
UINT64 Duration
Cumulative duration for this item.
Definition: Dp.h:78
UINT32 Count
Total number of measurements accumulated.
Definition: Dp.h:82
CHAR8 * Name
ASCII name of this item.
Definition: Dp.h:81
UINT32 NumSummary
Number of summary section measurements.
Definition: Dp.h:88
UINT32 NumHandles
Number of measurements with handles.
Definition: Dp.h:89
UINT32 NumPEIMs
Number of measurements of PEIMs.
Definition: Dp.h:90
UINT32 NumTrace
Number of recorded TRACE performance measurements.
Definition: Dp.h:86
UINT32 NumGlobal
Number of measurements with END value and NULL handle.
Definition: Dp.h:91
UINT32 NumIncomplete
Number of measurements with no END value.
Definition: Dp.h:87
UINT64 CumulativeTime
Accumulated Elapsed Time.
Definition: Dp.h:105
UINT64 MinTime
Minimum Elapsed Time.
Definition: Dp.h:106
CHAR8 * Name
Measured token string name.
Definition: Dp.h:104
UINT32 Count
Number of measurements accumulated.
Definition: Dp.h:108
UINT64 MaxTime
Maximum Elapsed Time.
Definition: Dp.h:107
Structure for storing Timer specific information.
Definition: Dp.h:59
UINT64 StartCount
Value timer is initialized with.
Definition: Dp.h:60
UINT32 Frequency
Timer count frequency in KHz.
Definition: Dp.h:62
UINT64 EndCount
Value timer has just before it wraps.
Definition: Dp.h:61
BOOLEAN CountUp
TRUE if the counter counts up.
Definition: Dp.h:63