Commit Graph

17 Commits

Author SHA1 Message Date
Beat Küng e75f5a4642 perf_counter: add perf_print_counter_buffer & perf_iterate_all
These can be used to print the perf counters to a buffer.
2017-04-01 20:19:52 +02:00
Carlo Wood de85fbe1dc Remaining fixes needed before running Tools/fix_headers.sh
<systemlib/err.h> --> "systemlib/err.h" that fix_headers.sh
would miss because it comes after code it doesn't understand.

Effectively remove the '__EXPORT extern perf_counter_t perf_alloc('
line, because currently perf_alloc is defined to be NULL, and
after running fix_headers.sh that happens *before* this header
is included (the order of headers will be changed).

Do not define NULL to be (void*)0: that only works for C.
In fact, the conversions needed for NULL are so full of exceptions
that standard C++ introduced a new *keyword*: nullptr.
That's what we really should be using for C++ code.
In this case I just include the correct header to define NULL
the correct way.

Not really related to the header line:
Removed an #include <time.h> because I noted that px4_time.h
was already included... and moved a #include <sys/time.h>
to the top of the file (not really a fan of including headers
in the middle unless absolutely necessary).
Removed a include of queue.h because I noted it wasn't used.
2016-11-13 19:36:27 +01:00
Julian Oes 1cf7de8fdb perf_counter: perf_print_counter now works on QURT 2016-04-25 12:48:48 +02:00
Julian Oes 662c097803 perf_counter: add function to set a count
This needed the set function which sets elapsed to change the name to
avoid ambiguities.
2016-04-25 12:48:48 +02:00
Mark Charlebois 187f13cd70 QuRT and POSIX changes - part 4
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:24:31 -07:00
Thomas Gubler 96db9e8188 Merge remote-tracking branch 'upstream/master' into ros
Conflicts:
	src/platforms/px4_middleware.h
2015-01-15 12:42:28 +01:00
Lorenz Meier 172dbf3707 Performance counters: Add option to set otherwise estimated time interval 2015-01-11 11:03:56 +01:00
Lorenz Meier a3bce71b97 Performance counters: Estimate RMS for elapsed counters. Allow to use a perf counter across processes, deal with overruns and other resulting inconsistencies from cross-process use. 2015-01-11 11:03:55 +01:00
Thomas Gubler 25af4b266c Merge remote-tracking branch 'upstream/master' into dev_ros
Conflicts:
	.gitignore
	src/lib/uavcan
2014-12-25 09:48:15 +01:00
Mark Whitehorn 9292c8f405 add interrupt latency printout command and mean/variance to interval performance counter 2014-12-24 14:06:05 -07:00
Thomas Gubler 9520983e08 lots' of header juggling and small changes to make mc att control compile for NuttX and ROS 2014-12-16 08:24:51 +01:00
Lorenz Meier 13f9ce9ddd Comment fix in perf counter header, no code changes. 2014-06-28 12:38:31 +02:00
Lorenz Meier aa2b125a67 perf: Allow printing to arbritrary fds 2014-05-21 14:19:39 +02:00
Anton Babushkin a79eef05bc perf_counter: added include 2014-02-24 23:48:00 +04:00
Andrew Tridgell 7257642371 perf: added perf_event_count() method
this allows drivers to get an event_count from a perf counter
2013-09-12 09:25:08 +02:00
px4dev 6871d2909b Add a mechanism for cancelling begin/end perf counters. 2013-07-05 22:53:57 -07:00
Lorenz Meier 13fc670386 Moved last libs, drivers and headers, cleaned up IO build 2013-04-28 09:54:11 +02:00