Navio perf measurement

Hi, I previously used ArduCoper on pixhawk.
I plan to test ArduCoper with Navio2.

In this situation, I am wondering whether there is a utility, perf.
This utility shows information on real-time task scheduling (Inside of ArduCopter.elf which means user-level task).
For example, on average, is each real-time task scheduled correctly and how much time each task consume for each loop.

If there is this utility, could you explain how to use it?
In binary, I found that perf functions are included. So, I guess there is a way to use it. But, I am not sure how to do it.

Thank you

Ps. Image and ArduCopter version:

  • OS Image: Raspbian Stretch (20170922)
  • ArduCopter: I plan to use 3.4 due to some reason.

Sure, there’s a way to use those.

The Perf classes on Linux depend on the library called lttng.

The easiest option is to compile ArduPilot on Raspberry itself to ease the cross-compiling linking to shared libraries hassle.

  • So first off, you’ll need the library

sudo apt-get install liblttng-ust-dev

  • Then proceed to the building from sources

Take a really close look at waf configure step. lttng library should pass the waf test. If it passes, you’re good to build the ArduPilot. It doesn’t make sense trying to build the latter unless the lttng check passes (in case you want tracing support).

Here’s the doc entry on the topic. I remember it missed that you need to add user “pi” to the group “tracing” if you want to perform tracing without sudo.

1 Like

But actually you can just set a parameter SCHED_DEBUG to 3 and see the information you requested in your GCS.

1 Like

This topic was automatically closed after 100 days. New replies are no longer allowed.