HyperPlatform Programmer's Reference
Functions | Variables
performance.cpp File Reference

Implements performance measurement functions. More...

#include "performance.h"
#include "common.h"
#include "log.h"
Include dependency graph for performance.cpp:

Go to the source code of this file.

Functions

NTSTATUS PerfInitialization ()
 Makes HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE() ready for use. More...
 
void PerfTermination ()
 Ends performance monitoring and outputs its results. More...
 
ULONG64 PerfGetTime ()
 Returns the current "time" for performance measurement. More...
 
static void PerfpInitialOutputRoutine (void *output_context)
 
static void PerfpOutputRoutine (const char *location_name, ULONG64 total_execution_count, ULONG64 total_elapsed_time, void *output_context)
 
static void PerfpFinalOutputRoutine (void *output_context)
 

Variables

static PerfCollector::InitialOutputRoutine PerfpInitialOutputRoutine
 
static PerfCollector::OutputRoutine PerfpOutputRoutine
 
static PerfCollector::FinalOutputRoutine PerfpFinalOutputRoutine
 
PerfCollectorg_performance_collector
 Stores all performance data collected by HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE(). More...
 

Detailed Description

Implements performance measurement functions.

Definition in file performance.cpp.

Function Documentation

◆ PerfGetTime()

ULONG64 PerfGetTime ( )

Returns the current "time" for performance measurement.

Returns
Current performance counter

It should only be used by HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE().

Definition at line 83 of file performance.cpp.

◆ PerfInitialization()

NTSTATUS PerfInitialization ( )

Makes HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE() ready for use.

Returns
STATUS_SUCCESS on success

Definition at line 53 of file performance.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PerfpFinalOutputRoutine()

static void PerfpFinalOutputRoutine ( void *  output_context)
static

Definition at line 103 of file performance.cpp.

◆ PerfpInitialOutputRoutine()

static void PerfpInitialOutputRoutine ( void *  output_context)
static

Definition at line 88 of file performance.cpp.

◆ PerfpOutputRoutine()

static void PerfpOutputRoutine ( const char *  location_name,
ULONG64  total_execution_count,
ULONG64  total_elapsed_time,
void *  output_context 
)
static

Definition at line 95 of file performance.cpp.

◆ PerfTermination()

void PerfTermination ( )

Ends performance monitoring and outputs its results.

Definition at line 73 of file performance.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_performance_collector

PerfCollector* g_performance_collector

Stores all performance data collected by HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE().

Definition at line 46 of file performance.cpp.

◆ PerfpFinalOutputRoutine

PerfCollector::FinalOutputRoutine PerfpFinalOutputRoutine
static

Definition at line 34 of file performance.cpp.

◆ PerfpInitialOutputRoutine

PerfCollector::InitialOutputRoutine PerfpInitialOutputRoutine
static

Definition at line 32 of file performance.cpp.

◆ PerfpOutputRoutine

PerfCollector::OutputRoutine PerfpOutputRoutine
static

Definition at line 33 of file performance.cpp.