+++ /dev/null
-/** @file\r
- Common declarations for the Dp Performance Reporting Utility.\r
-\r
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-\r
-#ifndef _EFI_APP_DP_H_\r
-#define _EFI_APP_DP_H_\r
-\r
-#include <Library/ShellLib.h>\r
-\r
-#define DP_MAJOR_VERSION 2\r
-#define DP_MINOR_VERSION 3\r
-\r
-/**\r
- * The value assigned to DP_DEBUG controls which debug output\r
- * is generated. Set it to ZERO to disable.\r
-**/\r
-#define DP_DEBUG 0\r
-\r
-/**\r
- * Set to 1 once Profiling has been implemented in order to enable\r
- * profiling related options and report output.\r
-**/\r
-#define PROFILING_IMPLEMENTED 0\r
-\r
-#define DEFAULT_THRESHOLD 1000 ///< One millisecond.\r
-#define DEFAULT_DISPLAYCOUNT 50\r
-#define MAXIMUM_DISPLAYCOUNT 999999 ///< Arbitrary maximum reasonable number.\r
-\r
-#define PERF_MAXDUR 0xFFFFFFFFFFFFFFFFULL\r
-\r
-/// Determine whether 0 <= C < L. If L == 0, return true regardless of C.\r
-#define WITHIN_LIMIT( C, L) ( ((L) == 0) || ((C) < (L)) )\r
-\r
-/// Structure for storing Timer specific information.\r
-typedef struct {\r
- UINT64 StartCount; ///< Value timer is initialized with.\r
- UINT64 EndCount; ///< Value timer has just before it wraps.\r
- UINT32 Frequency; ///< Timer count frequency in KHz.\r
- BOOLEAN CountUp; ///< TRUE if the counter counts up.\r
-} TIMER_INFO;\r
-\r
-/** Initialize one PERF_CUM_DATA structure instance for token t.\r
- *\r
- * This parameterized macro takes a single argument, t, which is expected\r
- * to resolve to a pointer to an ASCII string literal. This parameter may\r
- * take any one of the following forms:\r
- * - PERF_INIT_CUM_DATA("Token") A string literal\r
- * - PERF_INIT_CUM_DATA(pointer) A pointer -- CHAR8 *pointer;\r
- * - PERF_INIT_CUM_DATA(array) Address of an array -- CHAR8 array[N];\r
-**/\r
-#define PERF_INIT_CUM_DATA(t) { 0ULL, PERF_MAXDUR, 0ULL, (t), 0U }\r
-\r
-typedef struct {\r
- UINT64 Duration; ///< Cumulative duration for this item.\r
- UINT64 MinDur; ///< Smallest duration encountered.\r
- UINT64 MaxDur; ///< Largest duration encountered.\r
- CHAR8 *Name; ///< ASCII name of this item.\r
- UINT32 Count; ///< Total number of measurements accumulated.\r
-} PERF_CUM_DATA;\r
-\r
-typedef struct {\r
- UINT32 NumTrace; ///< Number of recorded TRACE performance measurements.\r
- UINT32 NumProfile; ///< Number of recorded PROFILE performance measurements.\r
- UINT32 NumIncomplete; ///< Number of measurements with no END value.\r
- UINT32 NumSummary; ///< Number of summary section measurements.\r
- UINT32 NumHandles; ///< Number of measurements with handles.\r
- UINT32 NumPEIMs; ///< Number of measurements of PEIMs.\r
- UINT32 NumGlobal; ///< Number of measurements with END value and NULL handle.\r
-} PERF_SUMMARY_DATA;\r
-\r
-typedef struct {\r
- CONST VOID *Handle;\r
- CONST CHAR8 *Token; ///< Measured token string name.\r
- CONST CHAR8 *Module; ///< Module string name.\r
- UINT64 StartTimeStamp; ///< Start time point.\r
- UINT64 EndTimeStamp; ///< End time point.\r
- UINT32 Identifier; ///< Identifier.\r
-} MEASUREMENT_RECORD;\r
-\r
-typedef struct {\r
- CHAR8 *Name; ///< Measured token string name.\r
- UINT64 CumulativeTime; ///< Accumulated Elapsed Time.\r
- UINT64 MinTime; ///< Minimum Elapsed Time.\r
- UINT64 MaxTime; ///< Maximum Elapsed Time.\r
- UINT32 Count; ///< Number of measurements accumulated.\r
-} PROFILE_RECORD;\r
-\r
-typedef struct {\r
- UINT16 Token;\r
- SHELL_PARAM_TYPE Type;\r
-} PARAM_ITEM_LIST;\r
-#endif // _EFI_APP_DP_H_\r