36 Commits

Author SHA1 Message Date
Daniel Agar
22a005c9f4
delete module's redundant print_status()
- we can already get the running status from ModuleBase and the other misc information is already available through perf or uORB
2019-11-30 18:22:19 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
c284198bec clang-tidy: partially fix hicpp-use-override 2019-10-28 10:50:31 -04:00
Daniel Agar
6f1f5e0325 clang-tidy: partially fix readability-redundant-declaration 2019-10-28 10:50:31 -04:00
Daniel Agar
26364d44c9
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
Daniel Agar
c8f77d438d
load_mon: update orb_publish to uORB::Publication<> 2019-09-02 20:41:34 -04:00
Beat Küng
f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Daniel Agar
0e949a36ee task_stack_info increase task_name length to match NuttX CONFIG_TASK_NAME_SIZE 2019-07-30 10:47:10 -04:00
Daniel Agar
6627c60e5b
load_mon move from NuttX LPWORK to PX4 work queue lp_default 2019-05-28 09:40:36 -04:00
bresch
ecacf4de46 Parameter update - Rename variables in modules/load_mon
using parameter_update.py script
2019-04-03 15:38:50 +02:00
Beat Küng
481bfc6308 px4_module: use px4_atomic_t 2019-01-30 10:24:06 -05:00
Daniel Agar
49be26b6cf
load_mon improve cpuload calculation and cleanup (#9852) 2018-12-21 22:27:58 -08:00
Christian Rauch
8a2e3800d8 check CONFIG_SCHED_INSTRUMENTATION for print_load_nuttx 2018-12-21 05:43:21 -08:00
Daniel Agar
d73d20bcce systemlib delete unused systemlib.h 2018-06-12 09:06:30 +02:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Beat Küng
f47d0c8f8c load_mon: reduce FDS_LOW_WARNING_THRESHOLD to 3
This bound can be quite tight, because:
- The system still behaves well, even if all FD's are used (as opposed to
  a stack overflow)
- The amount of used FD's is typically only increased one at a time
  (e.g. adding new logged topics, adding a mavlink stream, ...)
- reducing CONFIG_NFILE_DESCRIPTORS to the minimum frees up a considerable
  amount of RAM on systems that need it
2018-01-12 23:18:59 +01:00
Beat Küng
794c7a5a0f load_mon: fix tasks index & fds_free initialization
Makes sure that if CONFIG_NFILE_DESCRIPTORS == 0, no warning is printed.
2018-01-12 23:18:59 +01:00
Lorenz Meier
eb43b86a4b Load mon: Also monitor file descriptors
It is important that tasks do not run out of them and this addition will provide a warning and log evidence if it goes wrong.
2018-01-12 23:18:59 +01:00
Beat Küng
fa929322ab load_mon: remove usage of CONFIG_RAM_SIZE
The define should not be used, as it might be wrong.
This is the case on fmu-v5, which meant that the used RAM was always 1.
2017-12-07 20:28:17 +00:00
Beat Küng
8d7481f9ac load_mon: use ModuleBase & add documentation 2017-07-14 11:57:11 +02:00
Beat Küng
5c2fa034da load_mon: rename low_stack -> task_stack_info & always publish it
- use uorb queue to not drop any info, only do 2 tasks per cycle
- also print a warning on low stack (which will be added to ulog)

this allows to gather statistics of each task's stack usage over time.
2017-02-04 12:15:59 +01:00
Beat Küng
c02f1946eb load_mon: fix stack check: use up_check_tcbstack_remain()
The previous method did not work anymore since the NuttX upgrade.
2017-02-04 12:15:59 +01:00
David Sidrane
ff0e810b55 Nuttx changed CONFIG_DRAM_SIZE to CONFIG_RAM_SIZE 2016-12-21 08:34:21 +01:00
Lorenz Meier
4c714f0e46 Load mon: Be less verbose on boot 2016-12-12 16:11:21 +01:00
Andreas Antener
64778b9540 Load monitor: added parameter to disable stack check 2016-12-09 21:12:12 +01:00
Andreas Antener
72f52c920c Load monitor: reduce scope of scheduler locking 2016-12-09 21:12:12 +01:00
Andreas Antener
806b8d3a67 Load monitor: free counter 2016-12-09 21:12:12 +01:00
Andreas Antener
a0cf938ced Load monitor: lock scheduler for stack check and added performance counter for stack checking 2016-12-09 21:12:12 +01:00
Andreas Antener
dda0de09dd Load monitor: optimize performance of stack checking 2016-12-09 21:12:12 +01:00
Andreas Antener
62103be7ba Load monitor: report and log processes low on stack 2016-12-09 21:12:12 +01:00
Lorenz Meier
1a9688c42f Commander: signal high memory usage 2016-08-15 14:58:33 +02:00
Lorenz Meier
8934aaa912 Load mon: populate memory usage i field for NuttX 2016-08-15 14:53:48 +02:00
Julian Oes
54b3995175 load_mon: added missing include
USEC2TICK was not found.
2016-05-12 08:16:36 +02:00
Julian Oes
43d76f5e17 load_mon: use work queue instead of a whole task 2016-05-12 08:16:36 +02:00
Julian Oes
939f04c80d load_mon: small comment fix 2016-05-12 08:16:36 +02:00
Jonathan Challinger
749b598af1 load_mon: initial commit 2016-05-12 08:16:36 +02:00