drivers: remove the overflow perf counter

This was used together with the read() interface, but we don't use that
so the counters are wrong.
This commit is contained in:
Beat Küng
2017-03-20 09:11:34 +01:00
committed by Lorenz Meier
parent f60dfbbb40
commit 546bd2b4d0
23 changed files with 26 additions and 140 deletions
+1 -7
View File
@@ -226,7 +226,6 @@ private:
perf_counter_t _sample_perf;
perf_counter_t _comms_errors;
perf_counter_t _buffer_overflows;
struct baro_report _last_report; /**< used for info() */
@@ -336,7 +335,6 @@ LPS25H::LPS25H(device::Device *interface, const char *path) :
_class_instance(-1),
_sample_perf(perf_alloc(PC_ELAPSED, "lps25h_read")),
_comms_errors(perf_alloc(PC_COUNT, "lps25h_comms_errors")),
_buffer_overflows(perf_alloc(PC_COUNT, "lps25h_buffer_overflows")),
_last_report{0}
{
// set the device type from the interface
@@ -368,7 +366,6 @@ LPS25H::~LPS25H()
// free perf counters
perf_free(_sample_perf);
perf_free(_comms_errors);
perf_free(_buffer_overflows);
delete _interface;
}
@@ -771,9 +768,7 @@ LPS25H::collect()
_last_report = new_report;
/* post a report to the ring */
if (_reports->force(&new_report)) {
perf_count(_buffer_overflows);
}
_reports->force(&new_report);
/* notify anyone waiting for data */
poll_notify(POLLIN);
@@ -806,7 +801,6 @@ LPS25H::print_info()
{
perf_print_counter(_sample_perf);
perf_print_counter(_comms_errors);
perf_print_counter(_buffer_overflows);
printf("poll interval: %u ticks\n", _measure_ticks);
printf("pressure %.2f\n", (double)_last_report.pressure);
printf("altitude: %.2f\n", (double)_last_report.altitude);