RTEMS  5.0.0
profiling.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
11  *
12  * embedded brains GmbH
13  * Dornierstr. 4
14  * 82178 Puchheim
15  * Germany
16  * <rtems@embedded-brains.de>
17  *
18  * The license and distribution terms for this file may be
19  * found in the file LICENSE in this distribution or at
20  * http://www.rtems.org/license/LICENSE.
21  */
22 
23 #ifndef _RTEMS_PROFILING_H
24 #define _RTEMS_PROFILING_H
25 
26 #include <stdint.h>
27 
28 #include <rtems/print.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33 
65 typedef enum {
72 
80 
84 typedef struct {
88  rtems_profiling_type type;
90 
101 typedef struct {
106 
110  uint32_t processor_index;
111 
116 
124 
135 
149 
161 
168  uint64_t interrupt_count;
169 
180 
184 #define RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS 4
185 
204 typedef struct {
209 
213  const char *name;
214 
219 
224 
230  uint64_t usage_count;
231 
242 
252 
263  uint64_t contention_counts[RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS];
265 
269 typedef union {
274 
279 
285 
294 typedef void (*rtems_profiling_visitor)(
295  void *arg,
296  const rtems_profiling_data *data
297 );
298 
306  rtems_profiling_visitor visitor,
307  void *visitor_arg
308 );
309 
321  const char *name,
322  const rtems_printer *printer,
323  uint32_t indentation_level,
324  const char *indentation
325 );
326 
329 #ifdef __cplusplus
330 }
331 #endif /* __cplusplus */
332 
333 #endif /* _RTEMS_PROFILING_H */
uint32_t processor_index
The processor index of this profiling data.
Definition: profiling.h:110
rtems_profiling_header header
The profiling data header.
Definition: profiling.h:208
uint32_t max_interrupt_time
The maximum time spent to process a single sequence of nested interrupts in nanoseconds.
Definition: profiling.h:160
int rtems_profiling_report_xml(const char *name, const rtems_printer *printer, uint32_t indentation_level, const char *indentation)
Reports profiling data as XML.
Definition: profilingreportxml.c:272
uint32_t max_acquire_time
The maximum lock acquire time in nanoseconds.
Definition: profiling.h:218
SMP lock profiling data.
Definition: profiling.h:204
Type of per-CPU profiling data.
Definition: profiling.h:71
rtems_profiling_smp_lock smp_lock
SMP lock profiling data if indicated by the header.
Definition: profiling.h:283
uint64_t thread_dispatch_disabled_count
Count of times when the thread dispatch disable level changes from zero to one in thread context...
Definition: profiling.h:123
The profiling data header.
Definition: profiling.h:84
uint32_t max_interrupt_delay
The maximum interrupt delay in nanoseconds if supported by the hardware.
Definition: profiling.h:148
Definition: printer.h:55
uint64_t total_section_time
Total lock section time in nanoseconds.
Definition: profiling.h:251
uint32_t max_thread_dispatch_disabled_time
The maximum time of disabled thread dispatching in nanoseconds.
Definition: profiling.h:115
const char * name
The lock name.
Definition: profiling.h:213
Collection of profiling data.
Definition: profiling.h:269
#define RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS
Count of lock contention counters for SMP lock profiling.
Definition: profiling.h:184
rtems_profiling_header header
Header to specify the actual profiling data.
Definition: profiling.h:273
uint64_t total_interrupt_time
Total time of interrupt processing in nanoseconds.
Definition: profiling.h:178
void rtems_profiling_iterate(rtems_profiling_visitor visitor, void *visitor_arg)
Iterates through all profiling data of the system.
Definition: profilingiterate.c:141
void(* rtems_profiling_visitor)(void *arg, const rtems_profiling_data *data)
Visitor function for the profiling iteration.
Definition: profiling.h:294
rtems_profiling_header header
The profiling data header.
Definition: profiling.h:105
Per-CPU profiling data.
Definition: profiling.h:101
uint64_t total_acquire_time
Total lock acquire time in nanoseconds.
Definition: profiling.h:241
rtems_profiling_type type
The profiling data type.
Definition: profiling.h:88
uint64_t total_thread_dispatch_disabled_time
Total time of disabled thread dispatching in nanoseconds.
Definition: profiling.h:134
uint64_t interrupt_count
Count of times when the interrupt nest level changes from zero to one.
Definition: profiling.h:168
rtems_profiling_per_cpu per_cpu
Per-CPU profiling data if indicated by the header.
Definition: profiling.h:278
uint64_t usage_count
The count of lock uses.
Definition: profiling.h:230
Type of SMP lock profiling data.
Definition: profiling.h:78
uint32_t max_section_time
The maximum lock section time in nanoseconds.
Definition: profiling.h:223
rtems_profiling_type
Type of profiling data.
Definition: profiling.h:65