RTEMS CPU Kit with SuperCore  4.11.3
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 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
63 typedef enum {
70 
78 
82 typedef struct {
86  rtems_profiling_type type;
88 
99 typedef struct {
104 
108  uint32_t processor_index;
109 
114 
122 
133 
147 
159 
166  uint64_t interrupt_count;
167 
178 
182 #define RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS 4
183 
202 typedef struct {
207 
211  const char *name;
212 
217 
222 
228  uint64_t usage_count;
229 
240 
250 
261  uint64_t contention_counts[RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS];
263 
267 typedef union {
272 
277 
283 
292 typedef void (*rtems_profiling_visitor)(
293  void *arg,
294  const rtems_profiling_data *data
295 );
296 
304  rtems_profiling_visitor visitor,
305  void *visitor_arg
306 );
307 
319 typedef int (*rtems_profiling_printf)(void *arg, const char *format, ...);
320 
333  const char *name,
334  rtems_profiling_printf printf_func,
335  void *printf_arg,
336  uint32_t indentation_level,
337  const char *indentation
338 );
339 
342 #ifdef __cplusplus
343 }
344 #endif /* __cplusplus */
345 
346 #endif /* _RTEMS_PROFILING_H */
uint32_t processor_index
The processor index of this profiling data.
Definition: profiling.h:108
rtems_profiling_header header
The profiling data header.
Definition: profiling.h:206
uint32_t max_interrupt_time
The maximum time spent to process a single sequence of nested interrupts in nanoseconds.
Definition: profiling.h:158
uint32_t max_acquire_time
The maximum lock acquire time in nanoseconds.
Definition: profiling.h:216
SMP lock profiling data.
Definition: profiling.h:202
Type of per-CPU profiling data.
Definition: profiling.h:69
rtems_profiling_smp_lock smp_lock
SMP lock profiling data if indicated by the header.
Definition: profiling.h:281
Definition: mknod-pack_dev.c:255
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:121
The profiling data header.
Definition: profiling.h:82
uint32_t max_interrupt_delay
The maximum interrupt delay in nanoseconds if supported by the hardware.
Definition: profiling.h:146
uint64_t total_section_time
Total lock section time in nanoseconds.
Definition: profiling.h:249
uint32_t max_thread_dispatch_disabled_time
The maximum time of disabled thread dispatching in nanoseconds.
Definition: profiling.h:113
int(* rtems_profiling_printf)(void *arg, const char *format,...)
Function for formatted output.
Definition: profiling.h:319
const char * name
The lock name.
Definition: profiling.h:211
Collection of profiling data.
Definition: profiling.h:267
#define RTEMS_PROFILING_SMP_LOCK_CONTENTION_COUNTS
Count of lock contention counters for SMP lock profiling.
Definition: profiling.h:182
rtems_profiling_header header
Header to specify the actual profiling data.
Definition: profiling.h:271
uint64_t total_interrupt_time
Total time of interrupt processing in nanoseconds.
Definition: profiling.h:176
void rtems_profiling_iterate(rtems_profiling_visitor visitor, void *visitor_arg)
Iterates through all profiling data of the system.
Definition: profilingiterate.c:142
void(* rtems_profiling_visitor)(void *arg, const rtems_profiling_data *data)
Visitor function for the profiling iteration.
Definition: profiling.h:292
rtems_profiling_header header
The profiling data header.
Definition: profiling.h:103
Per-CPU profiling data.
Definition: profiling.h:99
uint64_t total_acquire_time
Total lock acquire time in nanoseconds.
Definition: profiling.h:239
rtems_profiling_type type
The profiling data type.
Definition: profiling.h:86
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.
Definition: profilingreportxml.c:278
uint64_t total_thread_dispatch_disabled_time
Total time of disabled thread dispatching in nanoseconds.
Definition: profiling.h:132
uint64_t interrupt_count
Count of times when the interrupt nest level changes from zero to one.
Definition: profiling.h:166
rtems_profiling_per_cpu per_cpu
Per-CPU profiling data if indicated by the header.
Definition: profiling.h:276
uint64_t usage_count
The count of lock uses.
Definition: profiling.h:228
Type of SMP lock profiling data.
Definition: profiling.h:76
uint32_t max_section_time
The maximum lock section time in nanoseconds.
Definition: profiling.h:221
rtems_profiling_type
Type of profiling data.
Definition: profiling.h:63