Closed dagar closed 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'll come back to this once profiling on hardware. Either with https://github.com/orbcode/orbuculum or a J-Trace.
From profiling on STM32F7 we see that our NuttX scheduling note functions and hrt_absolute_time (used by nearly everything in PX4 including cpuload) are quite hot. https://github.com/PX4/Firmware/blob/1d5309060a7b26366f8aa0973fc078593c04a47e/src/lib/systemlib/cpuload.c#L107
We should consider using ram functions (CONFIG_ARCH_RAMFUNCS) as well as simpler cpuload calculations that aren't a burden on every single scheduler operation.