RTEMS  5.0.0
Files | Data Structures | Macros | Typedefs | Enumerations | Functions
Profiling Support

The profiling support offers functions to report profiling information available in the system. More...

Files

file  profiling.h
 Profiling API.
 

Data Structures

struct  rtems_profiling_header
 The profiling data header. More...
 
struct  rtems_profiling_per_cpu
 Per-CPU profiling data. More...
 
struct  rtems_profiling_smp_lock
 SMP lock profiling data. More...
 
union  rtems_profiling_data
 Collection of profiling data. More...
 

Macros

#define RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS   4
 Count of lock contention counters for SMP lock profiling.
 

Typedefs

typedef void(* rtems_profiling_visitor) (void *arg, const rtems_profiling_data *data)
 Visitor function for the profiling iteration. More...
 

Enumerations

enum  rtems_profiling_type { RTEMS_PROFILING_PER_CPU, RTEMS_PROFILING_SMP_LOCK }
 Type of profiling data. More...
 

Functions

void rtems_profiling_iterate (rtems_profiling_visitor visitor, void *visitor_arg)
 Iterates through all profiling data of the system. More...
 
int rtems_profiling_report_xml (const char *name, const rtems_printer *printer, uint32_t indentation_level, const char *indentation)
 Reports profiling data as XML. More...
 

Detailed Description

The profiling support offers functions to report profiling information available in the system.

Profiling support is by default disabled. It must be enabled via the configure command line with the –enable-profiling option. In this case the RTEMS_PROFILING pre-processor symbol is defined and profiling statistics will be gathered during system run-time. The profiling support increases the time of critical sections and has some memory overhead. The overhead should be acceptable for most applications. The aim of the profiling implementation is to be available even for production systems so that verification is simplified.

Profiling information includes critical timing values such as the maximum time of disabled thread dispatching which is a measure for the thread dispatch latency. On SMP configurations statistics of all SMP locks in the system are available.

Profiling information can be retrieved via rtems_profiling_iterate() and reported as an XML dump via rtems_profiling_report_xml(). These functions are always available, but actual profiling data is only available if enabled at build configuration time.

Typedef Documentation

◆ rtems_profiling_visitor

typedef void(* rtems_profiling_visitor) (void *arg, const rtems_profiling_data *data)

Visitor function for the profiling iteration.

Parameters
[in,out]argThe visitor argument.
[in]dataThe current profiling data.
See also
rtems_profiling_iterate().

Enumeration Type Documentation

◆ rtems_profiling_type

Type of profiling data.

Enumerator
RTEMS_PROFILING_PER_CPU 

Type of per-CPU profiling data.

See also
rtems_profiling_per_cpu.
RTEMS_PROFILING_SMP_LOCK 

Type of SMP lock profiling data.

See also
rtems_profiling_smp_lock.

Function Documentation

◆ rtems_profiling_iterate()

void rtems_profiling_iterate ( rtems_profiling_visitor  visitor,
void *  visitor_arg 
)

Iterates through all profiling data of the system.

Parameters
[in]visitorThe visitor.
[in,out]visitor_argThe visitor argument.

◆ rtems_profiling_report_xml()

int rtems_profiling_report_xml ( const char *  name,
const rtems_printer printer,
uint32_t  indentation_level,
const char *  indentation 
)

Reports profiling data as XML.

Parameters
[in]nameThe name of the profiling report.
[in]printerThe RTEMS printer to send the output too.
[in]indentation_levelThe current indentation level.
[in]indentationThe string used for indentation.
Returns
As specified by printf().