I would like to profile a (C++, ROS) application on the Jetson NX using Nsight Systems but I can’t resolve an issue with brocken backtraces
for the CPU processes. I’ll appreciate any help:
system
Target: Jetson Xavier NX with JetPack 4.5.1
Target Nsight Systems CLI version: 2020.5.3
Host: Ubuntu 20.04
Host Nsight Systems w/ GUI version: 2020.5.1 (2020.5.3 does not seem to be available).
Problem:
When visualizing in nsys-ui
on the host the .qdrep
file that was generated on the target, I do get brocken Backtraces
in the top-down view.
The steps that I did before generating the .qdrep
file were (according to the user guide):
sudo sh -c 'echo 2 >/proc/sys/kernel/perf_event_paranoid'
and use the build flags:
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-g -funwind-tables -fno-omit-frame-pointer" -O2
My status of nsys status -e
reads:
Sampling Environment Check
Linux Kernel Paranoid Level = 2: OK
Linux Distribution = Ubuntu
Linux Kernel Version = 4.9.201-tegra: OK
Linux perf_event_open syscall available: OK
Sampling trigger event available: OK
Intel(c) Last Branch Record support: Not Available
Root privileges: No # <<-- note that I use "sudo nsys profile script.sh" instead
Kernel module: Available
Sampling Environment: OK
The profiling itself was launch like this:
sudo nsys profile -d 45 --process-scope=process-tree --backtrace=fp bash profile_script.sh
I also tried without --backtrace
and with --backtrace=dwarf
. The backtraces stay broken.
What can I do to solve this?
Not sure if this is related: I installed nsights systems not via the SDK Manger (would need to reflash but want to avoid to set up my system again), but via apt: sudo apt install nsight-systems-cli-2020.5.3
(for jetpack nsight 2020.5 seems to be the latest version as of now).