Commit Graph

22 Commits

Author SHA1 Message Date
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
Lorenz Meier c5a6442ce6 Perf print: Fix division by zero 2016-05-09 09:03:30 +02:00
Lorenz Meier 2e23d01b60 Systemlib: harden perf counter handling for null ptrs 2016-05-05 20:07:48 +02: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 c16c6a00e3 Clean up location of nuttx specific template
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-08 14:08:50 -07:00
Mark Charlebois eb40a6de77 cmake: qurt modules now build but do not link
Managed to get the deps set up to build the qurt modules using a
config file for the list of modules.

NuttX link options are being set somewhere that break the qurt build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-08 14:07:43 -07:00
Lorenz Meier fba569f12c Fix code style for system lib 2015-09-06 11:59:50 +02:00
tumbili 4d35291649 avoid division by zero 2015-09-03 09:56:07 +02:00
Andrew Tridgell 4eaa18e6f9 perf_counter: fixed write to correct fd for perf output
this fixes perf output for nsh over MAVLink
2015-08-28 21:57:09 +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
Mark Charlebois 5084a61f0e Abstractions to compile systemlib for Linux and Nuttx
Modified uint32_t casts of pointers to unsigned long for portability.
It otherwise breaks on x86_64.

Added _PX4_IOC to handle the conflice between _IOC on Linux and NuttX.

Removed use of px4::ok() because it cannot be used in a thread based
implementation. Changed to use px4::AppMgr which uses ok() on ROS.

Removed up_cxxinitialize.c from Linux build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Lorenz Meier 6203c73ccc Perf counter fixes 2015-01-11 11:03:56 +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
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 cfdbf2c5e9 perfcounter: write time unit for all fields 2014-06-23 11:15:27 +02:00
Lorenz Meier aa2b125a67 perf: Allow printing to arbritrary fds 2014-05-21 14:19:39 +02:00
Lorenz Meier f174ca3ce5 Added average as direct output 2013-12-20 21:52:10 +01: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