39 #ifndef _SYSTEMLIB_PERF_COUNTER_H 40 #define _SYSTEMLIB_PERF_COUNTER_H value 45 #define LATENCY_BUCKET_COUNT 8 47 extern const uint16_t latency_bucket_count;
48 extern const uint16_t latency_buckets[LATENCY_BUCKET_COUNT];
49 extern uint32_t latency_counters[LATENCY_BUCKET_COUNT + 1];
73 #ifndef perf_alloc // perf_alloc might be defined to be NULL in src/modules/px4iofirmware/px4io.h 197 typedef void (*perf_callback)(perf_counter_t handle,
void *user);
measure the time elapsed performing an event
Definition: perf_counter.h:56
__EXPORT void perf_print_counter_fd(int fd, perf_counter_t handle)
Print one performance counter to a fd.
Definition: perf_counter.cpp:447
__EXPORT void perf_print_latency(int fd)
Print hrt latency counters.
Definition: perf_counter.cpp:603
__EXPORT void perf_set_count(perf_counter_t handle, uint64_t count)
Set a counter.
Definition: perf_counter.cpp:361
perf_counter_type
Counter types.
Definition: perf_counter.h:54
__EXPORT void perf_end(perf_counter_t handle)
End a performance event.
Definition: perf_counter.cpp:275
__EXPORT void perf_print_counter(perf_counter_t handle)
Print one performance counter to stdout.
Definition: perf_counter.cpp:437
count the number of times an event occurs
Definition: perf_counter.h:55
__EXPORT void perf_reset_all(void)
Reset all of the performance counters.
Definition: perf_counter.cpp:616
Generally used magic defines.
__EXPORT void perf_iterate_all(perf_callback cb, void *user)
Iterate over all performance counters using a callback.
Definition: perf_counter.cpp:575
__EXPORT uint64_t perf_event_count(perf_counter_t handle)
Return current event_count.
Definition: perf_counter.cpp:547
__EXPORT int perf_print_counter_buffer(char *buffer, int length, perf_counter_t handle)
Print one performance counter to a buffer.
Definition: perf_counter.cpp:495
__EXPORT void perf_cancel(perf_counter_t handle)
Cancel a performance event.
Definition: perf_counter.cpp:380
__EXPORT void perf_begin(perf_counter_t handle)
Begin a performance event.
Definition: perf_counter.cpp:258
Definition: video_device.h:50
__BEGIN_DECLS __EXPORT perf_counter_t perf_alloc(enum perf_counter_type type, const char *name)
Create a new local counter.
Definition: perf_counter.cpp:123
__EXPORT perf_counter_t perf_alloc_once(enum perf_counter_type type, const char *name)
Get the reference to an existing counter or create a new one if it does not exist.
Definition: perf_counter.cpp:156
__EXPORT void perf_set_elapsed(perf_counter_t handle, int64_t elapsed)
Register a measurement.
Definition: perf_counter.cpp:320
__EXPORT void perf_count(perf_counter_t handle)
Count a performance event.
Definition: perf_counter.cpp:199
__EXPORT void perf_print_all(int fd)
Print all of the performance counters.
Definition: perf_counter.cpp:589
__EXPORT void perf_reset(perf_counter_t handle)
Reset a performance counter.
Definition: perf_counter.cpp:402
measure the interval between instances of an event
Definition: perf_counter.h:57
__EXPORT void perf_free(perf_counter_t handle)
Free a counter.
Definition: perf_counter.cpp:185