![]() |
RTEMS 6.3
|
The profiling support offers functions to report profiling information available in the system. More...
Files | |
| file | cpukit/include/rtems/profiling.h |
| This header file provides the Profiling Support API. | |
| file | cpukit/sapi/src/profilingiterate.c |
| This source file contains the implementation of rtems_profiling_iterate(). | |
| file | cpukit/sapi/src/profilingreportxml.c |
| This source file contains the implementation of rtems_profiling_report_xml(). | |
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. | |
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. | |
| int | rtems_profiling_report_xml (const char *name, const rtems_printer *printer, uint32_t indentation_level, const char *indentation) |
| Reports profiling data as XML. | |
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 void(*) rtems_profiling_visitor(void *arg, const rtems_profiling_data *data) |
Visitor function for the profiling iteration.
| [in,out] | arg | The visitor argument. |
| [in] | data | The current profiling data. |
| enum rtems_profiling_type |
Type of profiling data.
| Enumerator | |
|---|---|
| RTEMS_PROFILING_PER_CPU | Type of per-CPU profiling data.
|
| RTEMS_PROFILING_SMP_LOCK | Type of SMP lock profiling data.
|
| void rtems_profiling_iterate | ( | rtems_profiling_visitor | visitor, |
| void * | visitor_arg ) |
Iterates through all profiling data of the system.
| [in] | visitor | The visitor. |
| [in,out] | visitor_arg | The visitor argument. |
| int rtems_profiling_report_xml | ( | const char * | name, |
| const rtems_printer * | printer, | ||
| uint32_t | indentation_level, | ||
| const char * | indentation ) |
Reports profiling data as XML.
| [in] | name | The name of the profiling report. |
| [in] | printer | The RTEMS printer to send the output too. |
| [in] | indentation_level | The current indentation level. |
| [in] | indentation | The string used for indentation. |