The profiling support offers functions to report profiling information available in the system.
More...
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.
◆ rtems_profiling_printf
typedef int(* rtems_profiling_printf) (void *arg, const char *format,...) |
Function for formatted output.
- Parameters
-
[in,out] | arg | Some argument. |
[in] | format | The output format as specified by printf(). |
[in] | ... | More parameters according to format. |
- Returns
- As specified by printf().
- See also
- rtems_profiling_report_xml().
◆ rtems_profiling_visitor
Visitor function for the profiling iteration.
- Parameters
-
[in,out] | arg | The visitor argument. |
[in] | data | The current profiling data. |
- See also
- rtems_profiling_iterate().
◆ rtems_profiling_type
◆ rtems_profiling_iterate()
Iterates through all profiling data of the system.
- Parameters
-
[in] | visitor | The visitor. |
[in,out] | visitor_arg | The visitor argument. |
◆ rtems_profiling_report_xml()
int rtems_profiling_report_xml |
( |
const char * |
name, |
|
|
rtems_profiling_printf |
printf_func, |
|
|
void * |
printf_arg, |
|
|
uint32_t |
indentation_level, |
|
|
const char * |
indentation |
|
) |
| |
Reports profiling data as XML.
- Parameters
-
[in] | name | The name of the profiling report. |
[in] | printf_func | The formatted output function. |
[in,out] | printf_arg | The formatted output function argument. |
[in] | indentation_level | The current indentation level. |
[in] | indentation | The string used for indentation. |
- Returns
- As specified by printf().
Referenced by rtems_test_fatal_extension().