px4iofirmware: add PX4IO_PERF define to completely disable perf counters

This commit is contained in:
Daniel Agar
2020-02-10 09:40:39 +01:00
committed by Julian Oes
parent 2015cc2b39
commit 8cdbc4c593
14 changed files with 118 additions and 30 deletions
-6
View File
@@ -48,12 +48,6 @@
#include "perf_counter.h"
/* latency histogram */
const uint16_t latency_bucket_count = LATENCY_BUCKET_COUNT;
const uint16_t latency_buckets[LATENCY_BUCKET_COUNT] = { 1, 2, 5, 10, 20, 50, 100, 1000 };
__EXPORT uint32_t latency_counters[LATENCY_BUCKET_COUNT + 1];
#ifdef __PX4_QURT
// There is presumably no dprintf on QURT. Therefore use the usual output to mini-dm.
#define dprintf(_fd, _text, ...) ((_fd) == 1 ? PX4_INFO((_text), ##__VA_ARGS__) : (void)(_fd))
-6
View File
@@ -42,12 +42,6 @@
#include <stdint.h>
#include <px4_platform_common/defines.h>
#define LATENCY_BUCKET_COUNT 8
extern const uint16_t latency_bucket_count;
extern const uint16_t latency_buckets[LATENCY_BUCKET_COUNT];
extern uint32_t latency_counters[LATENCY_BUCKET_COUNT + 1];
/**
* Counter types.
*/