perf counter cleanup (mostly intervals)

Some of these perf counters were useful during initial development, but realistically aren't needed anymore, some are redundant when we can now see the average interval from `work_queue status` and some of them simply aren't worth the cost at higher rates.
This commit is contained in:
Daniel Agar
2019-10-21 18:54:17 -04:00
committed by GitHub
parent f7e62349b3
commit 35398e05ca
10 changed files with 11 additions and 73 deletions
+1 -6
View File
@@ -220,7 +220,6 @@ private:
bool _outputs_initialized{false};
perf_counter_t _cycle_perf;
perf_counter_t _cycle_interval_perf;
void capture_callback(uint32_t chan_index,
hrt_abstime edge_time, uint32_t edge_state, uint32_t overflow);
@@ -247,8 +246,7 @@ px4::atomic_bool DShotOutput::_request_telemetry_init{false};
DShotOutput::DShotOutput() :
CDev("/dev/dshot"),
OutputModuleInterface(MODULE_NAME, px4::wq_configurations::hp_default),
_cycle_perf(perf_alloc(PC_ELAPSED, "dshot: cycle")),
_cycle_interval_perf(perf_alloc(PC_INTERVAL, "dshot: cycle interval"))
_cycle_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": cycle"))
{
_mixing_output.setAllDisarmedValues(DISARMED_VALUE);
_mixing_output.setAllMinValues(DISARMED_VALUE + 1);
@@ -265,7 +263,6 @@ DShotOutput::~DShotOutput()
unregister_class_devname(PWM_OUTPUT_BASE_DEVICE_PATH, _class_instance);
perf_free(_cycle_perf);
perf_free(_cycle_interval_perf);
delete _telemetry;
}
@@ -756,7 +753,6 @@ DShotOutput::Run()
}
perf_begin(_cycle_perf);
perf_count(_cycle_interval_perf);
_mixing_output.update();
@@ -1667,7 +1663,6 @@ int DShotOutput::print_status()
PX4_INFO("Outputs initialized: %s", _outputs_initialized ? "yes" : "no");
PX4_INFO("Outputs on: %s", _outputs_on ? "yes" : "no");
perf_print_counter(_cycle_perf);
perf_print_counter(_cycle_interval_perf);
_mixing_output.printStatus();
if (_telemetry) {
PX4_INFO("telemetry on: %s", _telemetry_device);