Declarations of objects defined internally to the Dp Application.
Declarations of data and functions which are private to the Dp application. This file should never be referenced by anything other than components of the Dp application. In addition to global data, function declarations for DpUtilities.c, DpTrace.c, and DpProfile.c are included here.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DpInternal.h.
VOID DpGetShortPdbFileName |
( |
IN CHAR8 * |
PdbFileName, |
|
|
OUT CHAR16 * |
UnicodeBuffer |
|
) |
| |
Get the file name portion of the Pdb File Name.
The portion of the Pdb File Name between the last backslash and either a following period or the end of the string is converted to Unicode and copied into UnicodeBuffer. The name is truncated, if necessary, to ensure that UnicodeBuffer is not overrun.
- Parameters
-
[in] | PdbFileName | Pdb file name. |
[out] | UnicodeBuffer | The resultant Unicode File Name. |
Definition at line 150 of file DpUtilities.c.
UINT64 DurationInMicroSeconds |
( |
IN UINT64 |
Duration | ) |
|
Calculate the Duration in microseconds.
Duration is multiplied by 1000, instead of Frequency being divided by 1000 or multiplying the result by 1000, in order to maintain precision. Since Duration is a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.
The time is calculated as (Duration * 1000) / Timer_Frequency.
- Parameters
-
[in] | Duration | The event duration in timer ticks. |
- Returns
- A 64-bit value which is the Elapsed time in microseconds.
Definition at line 392 of file DpUtilities.c.
Collect verbose statistics about the logged performance measurements.
General Summary information for all Trace measurements is gathered and stored within the SummaryData structure. This information is both used internally by subsequent reporting functions, and displayed at the end of verbose reports.
- Precondition
- The SummaryData and CumData structures must be initialized prior to calling this function.
- Postcondition
- The SummaryData and CumData structures contain statistics for the current performance logs.
- Parameters
-
[in,out] | CustomCumulativeData | The pointer to the custom cumulative data. |
Collect verbose statistics about the logged performance measurements.
General Summary information for all Trace measurements is gathered and stored within the SummaryData structure. This information is both used internally by subsequent reporting functions, and displayed at the end of verbose reports.
- Precondition
- The SummaryData and CumData structures must be initialized prior to calling this function.
- Postcondition
- The SummaryData and CumData structures contain statistics for the current performance logs.
- Parameters
-
[in,out] | CustomCumulativeData | A pointer to the custom cumulative data. |
Definition at line 92 of file DpTrace.c.
Calculate an event's duration in timer ticks.
Given the count direction and the event's start and end timer values, calculate the duration of the event in timer ticks. Information for the current measurement is pointed to by the parameter.
If the measurement's start time is 1, it indicates that the developer is indicating that the measurement began at the release of reset. The start time is adjusted to the timer's starting count before performing the elapsed time calculation.
The calculated duration, in ticks, is the absolute difference between the measurement's ending and starting counts.
- Parameters
-
Measurement | Pointer to a MEASUREMENT_RECORD structure containing data for the current measurement. |
- Returns
- The 64-bit duration of the event.
Definition at line 57 of file DpUtilities.c.
Determine whether the Measurement record is for an EFI Phase.
The Token and Module members of the measurement record are checked. Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.
- Parameters
-
[in] | Measurement | A pointer to the Measurement record to test. |
- Return values
-
TRUE | The measurement record is for an EFI Phase. |
FALSE | The measurement record is NOT for an EFI Phase. |
Definition at line 91 of file DpUtilities.c.
Gather and print cumulative data.
Traverse the measurement records and:
For each record with a Token listed in the CumData array:
- Update the instance count and the total, minimum, and maximum durations. Finally, print the gathered cumulative statistics.
- Parameters
-
[in] | CustomCumulativeData | The pointer to the custom cumulative data. |
Gather and print cumulative data.
Traverse the measurement records and:
For each record with a Token listed in the CumData array:
- Update the instance count and the total, minimum, and maximum durations. Finally, print the gathered cumulative statistics.
- Parameters
-
[in] | CustomCumulativeData | A pointer to the custom cumulative data. |
Definition at line 966 of file DpTrace.c.