However, when I reboot the board, I could see only
pi@navio: ~$sudo lttng list --userspace
→ UST events:
None
w/o sudo it is same.
Since I am not sure about “ardupilot” in the below.
lttng enable-event --userspace ardupilot:count
lttng enable-event --userspace ardupilot:end
lttng enable-event --userspace ardupilot:begin
I changed it into “0” or “1” since I put that name when I call perf_alloc
In addition, I cannot see any results even with SCHED_DEBUG parameter setting which must show some results I believe.
Is there any person who have experience with lltng on NAVIO2?
Thank you
PS. Note that I also tried all lltng commands with sudo since ardupilot runs on root privilege. But, I couldn’t see any difference.
By default ArduPilot is not linked to lttng. You can install liblltng dev packages on the Raspberry itself and build ArduPilot there. Make sure that waf configure --board=navio2 states that lttng is detected and linked to. That is the easy but slow way.
Another approach is not for faint-hearted. We’ll cross-compile ArduPilot on a Linux host against the sysroot with the g++ wrapper that’s properly symlinked like this:
SYSROOT is the environment variable to a mounted rootfs from Raspberry Pi with all the needed libraries.
So it all boils down to this:
Grab our image and save it to $IMAGE_FILE and extract
sudo kpartx -av $IMAGE_FILE to make a loopback device
sudo mount /dev/mapper/loopXp2 rootfs to mount it
systemd-nspawn -b --bind /usr/bin/qemu-arm-static -D rootfs to boot the image. Make sure binfmt module is loaded
Now you have an emulated with qemu Raspberry Pi where you can poke around.
sudo apt-get install liblttng dev packages inside the container
Quit the container
After this steps you’ll have a rootfs with all libraries you need
8) Point SYSROOT to rootfs directory
7) waf configure --board=navio2 on your host should now detect liblltng and link against it.
You should see a message every once in a while in your GCS after you set it.