From dd774a60e3c3257f174509e0cd1a7c861a50d4e0 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 5 May 2016 20:08:11 +0200 Subject: [PATCH] IO driver: Reduce perf counters --- src/drivers/px4io/px4io.cpp | 2 +- src/drivers/px4io/px4io_serial.cpp | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index f62edabcc8..0e3cf097be 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -900,7 +900,7 @@ PX4IO::init() _task = px4_task_spawn_cmd("px4io", SCHED_DEFAULT, SCHED_PRIORITY_ACTUATOR_OUTPUTS, - 1500, + 1400, (main_t)&PX4IO::task_main_trampoline, nullptr); diff --git a/src/drivers/px4io/px4io_serial.cpp b/src/drivers/px4io/px4io_serial.cpp index 2c38c0dd3c..258fa0b5db 100644 --- a/src/drivers/px4io/px4io_serial.cpp +++ b/src/drivers/px4io/px4io_serial.cpp @@ -180,7 +180,8 @@ PX4IO_serial::PX4IO_serial() : _rx_dma_status(_dma_status_inactive), _bus_semaphore(SEM_INITIALIZER(0)), _completion_semaphore(SEM_INITIALIZER(0)), - _pc_txns(perf_alloc(PC_ELAPSED, "io_txns ")), + _pc_txns(perf_alloc(PC_ELAPSED, "io_txns")), +#if 0 _pc_dmasetup(perf_alloc(PC_ELAPSED, "io_dmasetup ")), _pc_retries(perf_alloc(PC_COUNT, "io_retries ")), _pc_timeouts(perf_alloc(PC_COUNT, "io_timeouts ")), @@ -190,6 +191,17 @@ PX4IO_serial::PX4IO_serial() : _pc_uerrs(perf_alloc(PC_COUNT, "io_uarterrs ")), _pc_idle(perf_alloc(PC_COUNT, "io_idle ")), _pc_badidle(perf_alloc(PC_COUNT, "io_badidle ")) +#else + _pc_dmasetup(nullptr), + _pc_retries(nullptr), + _pc_timeouts(nullptr), + _pc_crcerrs(nullptr), + _pc_dmaerrs(nullptr), + _pc_protoerrs(nullptr), + _pc_uerrs(nullptr), + _pc_idle(nullptr), + _pc_badidle(nullptr) +#endif { g_interface = this; }