Debugging with Register Trace Buffers¶
You can use NVIDIA® Jetson™ RTRACE to determine what register access happened before a reset or panic. With RTRACE, kernel traces trigger read/write calls into a persistent register trace buffer that you can decode and dump after reboot, using the pstore file system.
RTRACE does not require ramdump. It prints parsed output from the device directly.
To enable RTRACE¶
Todo
Will the reader know what to add the commands to? Presumably a configuration file, but is it a special file for RTRACE, or a more generalized file for boot parameters?
Add this setting to the kernel configuration:
CONFIG_PSTORE_RTRACE=y
Todo
Will the reader necessarily know what “the kernel configuration” is? Presumably a configuration file, but is it a special file for RTRACE, or a more generalized file for boot parameters?
Add this setting as well if you want to start RTRACE automatically:
CONFIG_PSTORE_RTRACE_ENABLE_AT_STARTUP=y
To start and stop RTRACE¶
To start RTRACE, enter the command:
$ echo 1 > /sys/kernel/debug/pstore/record_rtrace
To stop RTRACE, enter the command:
$ echo 0 > /sys/kernel/debug/pstore/record_rtrace
Locating RTRACE Output¶
Output from RTRACE is available after reboot in the following file on the Jetson device:
/sys/fs/pstore/rtrace-ramoops
RTRACE output resembles this example:
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 R fe406314 <- c038df4c mem_serial_in+0x2c/0x38
0 W fe406304 <- c038df18 mem_serial_out+0x30/0x38