aboutsummaryrefslogtreecommitdiff
path: root/apps/systemlib/perf_counter.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-01-24 10:00:23 +1100
committerAndrew Tridgell <tridge@samba.org>2013-01-24 10:26:02 +1100
commitf4da4bb8ca29a48e1bf10958cbc45fc9fb10e9f7 (patch)
tree212316bada5b3e659ff2a0fba4e21e2cad788291 /apps/systemlib/perf_counter.h
parentcc74874d7ed2f94a030a97b52c91d684f1d4cfa4 (diff)
downloadpx4-firmware-f4da4bb8ca29a48e1bf10958cbc45fc9fb10e9f7.tar.gz
px4-firmware-f4da4bb8ca29a48e1bf10958cbc45fc9fb10e9f7.tar.bz2
px4-firmware-f4da4bb8ca29a48e1bf10958cbc45fc9fb10e9f7.zip
perf_counter: added perf_reset() and perf_reset_all() calls
useful for watching counters after system reaches stable flight
Diffstat (limited to 'apps/systemlib/perf_counter.h')
-rw-r--r--apps/systemlib/perf_counter.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/systemlib/perf_counter.h b/apps/systemlib/perf_counter.h
index 6e6c80d5b..5c2cb15b2 100644
--- a/apps/systemlib/perf_counter.h
+++ b/apps/systemlib/perf_counter.h
@@ -97,6 +97,14 @@ __EXPORT extern void perf_begin(perf_counter_t handle);
*/
__EXPORT extern void perf_end(perf_counter_t handle);
+/**
+ * Reset a performance event.
+ *
+ * This call resets performance counter to initial state
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+__EXPORT extern void perf_reset(perf_counter_t handle);
/**
* Print one performance counter.
@@ -110,6 +118,11 @@ __EXPORT extern void perf_print_counter(perf_counter_t handle);
*/
__EXPORT extern void perf_print_all(void);
+/**
+ * Reset all of the performance counters.
+ */
+__EXPORT extern void perf_reset_all(void);
+
__END_DECLS
#endif