TianoCore EDK2 master
Loading...
Searching...
No Matches
DpTrace.c File Reference

Go to the source code of this file.

Functions

UINTN GetPerformanceMeasurementRecord (IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, OUT UINT64 *StartTimeStamp, OUT UINT64 *EndTimeStamp, OUT UINT32 *Identifier)
 
VOID GatherStatistics (IN OUT PERF_CUM_DATA *CustomCumulativeData OPTIONAL)
 
EFI_STATUS DumpAllTrace (IN UINTN Limit, IN BOOLEAN ExcludeFlag)
 
EFI_STATUS DumpRawTrace (IN UINTN Limit, IN BOOLEAN ExcludeFlag)
 
VOID ProcessPhases (VOID)
 
EFI_STATUS ProcessHandles (IN BOOLEAN ExcludeFlag)
 
EFI_STATUS ProcessPeims (VOID)
 
EFI_STATUS ProcessGlobal (VOID)
 
VOID ProcessCumulative (IN PERF_CUM_DATA *CustomCumulativeData OPTIONAL)
 

Detailed Description

Trace reporting for the Dp utility.

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 DpTrace.c.

Function Documentation

◆ DumpAllTrace()

EFI_STATUS DumpAllTrace ( IN UINTN  Limit,
IN BOOLEAN  ExcludeFlag 
)

Gather and print ALL Trace Records.

Displays all "interesting" Trace measurements in order.
The number of records displayed is controlled by:

  • records with a duration less than mInterestThreshold microseconds are not displayed.
  • No more than Limit records are displayed. A Limit of zero will not limit the output.
  • If the ExcludeFlag is TRUE, records matching entries in the CumData array are not displayed.
Precondition
The mInterestThreshold global variable is set to the shortest duration to be printed. The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. They must not be in use by a calling function.
Parameters
[in]LimitThe number of records to print. Zero is ALL.
[in]ExcludeFlagTRUE to exclude individual Cumulative items from display.
Return values
EFI_SUCCESSThe operation was successful.
EFI_ABORTEDThe user aborts the operation.
Returns
Others from a call to gBS->LocateHandleBuffer().

Definition at line 188 of file DpTrace.c.

◆ DumpRawTrace()

EFI_STATUS DumpRawTrace ( IN UINTN  Limit,
IN BOOLEAN  ExcludeFlag 
)

Gather and print Raw Trace Records.

All Trace measurements with a duration greater than or equal to mInterestThreshold are printed without interpretation.

The number of records displayed is controlled by:

  • records with a duration less than mInterestThreshold microseconds are not displayed.
  • No more than Limit records are displayed. A Limit of zero will not limit the output.
  • If the ExcludeFlag is TRUE, records matching entries in the CumData array are not displayed.
Precondition
The mInterestThreshold global variable is set to the shortest duration to be printed.
Parameters
[in]LimitThe number of records to print. Zero is ALL.
[in]ExcludeFlagTRUE to exclude individual Cumulative items from display.
Return values
EFI_SUCCESSThe operation was successful.
EFI_ABORTEDThe user aborts the operation.

Definition at line 363 of file DpTrace.c.

◆ GatherStatistics()

VOID GatherStatistics ( IN OUT PERF_CUM_DATA *CustomCumulativeData  OPTIONAL)

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]CustomCumulativeDataA pointer to the custom cumulative data.

Definition at line 92 of file DpTrace.c.

◆ GetPerformanceMeasurementRecord()

UINTN GetPerformanceMeasurementRecord ( IN UINTN  LogEntryKey,
OUT CONST VOID **  Handle,
OUT CONST CHAR8 **  Token,
OUT CONST CHAR8 **  Module,
OUT UINT64 *  StartTimeStamp,
OUT UINT64 *  EndTimeStamp,
OUT UINT32 *  Identifier 
)

Attempts to retrieve a performance measurement log entry from the performance measurement log.

Parameters
LogEntryKeyOn entry, the key of the performance measurement log entry to retrieve. 0, then the first performance measurement log entry is retrieved. On exit, the key of the next performance log entry.
HandlePointer to environment specific context used to identify the component being measured.
TokenPointer to a Null-terminated ASCII string that identifies the component being measured.
ModulePointer to a Null-terminated ASCII string that identifies the module being measured.
StartTimeStampPointer to the 64-bit time stamp that was recorded when the measurement was started.
EndTimeStampPointer to the 64-bit time stamp that was recorded when the measurement was ended.
IdentifierPointer to the 32-bit identifier that was recorded when the measurement was ended.
Returns
The key for the next performance log entry (in general case).

Definition at line 48 of file DpTrace.c.

◆ ProcessCumulative()

VOID ProcessCumulative ( IN PERF_CUM_DATA *CustomCumulativeData  OPTIONAL)

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]CustomCumulativeDataA pointer to the custom cumulative data.

Definition at line 966 of file DpTrace.c.

◆ ProcessGlobal()

EFI_STATUS ProcessGlobal ( VOID  )

Gather and print global data.

Strips out incomplete or "Execution Phase" records Only prints records where Handle is NULL Increment TIndex for every record, even skipped ones, so that we have an indication of every measurement record taken.

Return values
EFI_SUCCESSThe operation was successful.
EFI_ABORTEDThe user aborts the operation.

Definition at line 853 of file DpTrace.c.

◆ ProcessHandles()

EFI_STATUS ProcessHandles ( IN BOOLEAN  ExcludeFlag)

Gather and print Handle data.

Parameters
[in]ExcludeFlagTRUE to exclude individual Cumulative items from display.
Return values
EFI_SUCCESSThe operation was successful.
EFI_ABORTEDThe user aborts the operation.
Returns
Others from a call to gBS->LocateHandleBuffer().

Definition at line 610 of file DpTrace.c.

◆ ProcessPeims()

EFI_STATUS ProcessPeims ( VOID  )

Gather and print PEIM data.

Only prints complete PEIM records

Return values
EFI_SUCCESSThe operation was successful.
EFI_ABORTEDThe user aborts the operation.

Definition at line 747 of file DpTrace.c.

◆ ProcessPhases()

VOID ProcessPhases ( VOID  )

Gather and print Major Phase metrics.

Definition at line 478 of file DpTrace.c.