slackspot(1)
| SLACKSPOT(1) | Xenomai Manual | SLACKSPOT(1) |
NAME
slackspot - Trace secondary mode switches
SYNOPSIS
slackspot [ options ]
DESCRIPTION
slackspot is a utility to decode the trace data collected by the Cobalt core when CONFIG_XENO_OPT_DEBUG_TRACE_RELAX is enabled in the kernel configuration.
This data describes each call hierarchy causing migration to secondary mode (i.e. relaxes) within the application. slackspot presents such data in a human-readable format as symbolic stack backtraces, for helping in debugging spurious relaxes.
OPTIONS
slackspot accepts the following options:
--file <trace-file>
--path <dir[:dir...]>
--filter-in <name=exp[,name=...]>
--filter <name=exp[,name=...]>
--filter-out <name=exp[,name=...]>
CROSS_COMPILE=<toolchain-prefix>
VERSIONS
slackspot appeared in Xenomai 3.0 for the Cobalt real-time core.
EXAMPLE
In the following scenario, the target system built with the CONFIG_XENO_OPT_DEBUG_TRACE_RELAX feature enabled in the kernel configuration, just ran the /bin/relax program.
This program caused a transition to secondary mode switch of the current task (Task 2) as a result of calling putchar(). The Cobalt core saved the corresponding backtrace information, which is now available from /proc/xenomai/debug/relax on the target system.
Since the target system has limited horsepower, and doesn’t have access to the binary utilities required for decoding the trace data, we will send such data over the network to the host system, in order for the latter to do the decoding and display the call stacks.
We use the standard netcat utility to send and receive the contents of /proc/xenomai/debug/relax over the wire between the target and host systems. The host will also have to mention where the cross-compilation toolchain can be found, by setting the CROSS_COMPILE variable appropriately. The example assumes that /opt/rootfs/MPC5200/lib is the host-based location of the system libraries mounted over NFS onto the target file hierarchy.
On the target system:.
target> netcat -l -p 67676 -c < /proc/xenomai/debug/relax
On the host system:.
host> netcat target 67676 | CROSS_COMPILE=ppc_6xx- slackspot
--path=/opt/rootfs/MPC5200/lib:$HOME/frags/relax --filter thread=Task* Thread[828] "Task 2" started by /bin/relax:
#0 0xfff00000 ???
#1 0x000001bb ???
#2 0x00064393 _IO_file_doallocate() in ??:?
#3 0x00073d6f _IO_doallocbuf() in ??:?
#4 0x00072d87 _IO_file_overflow() in ??:?
#5 0x00075f83 __overflow() in ??:?
#6 0x0006997b putchar() in ??:?
#7 0x100017db task2_func() in /home/rpm/frags/relax/relax.c:23
#8 0x000078d7 task_entry() in /home/rpm/git/xenomai-forge/lib/alchemy/task.c:235
#9 0x00005a6b start_thread() in pthread_create.c:?
#10 0x000d389f __clone() in ??:?
AUTHOR
slackspot was written by Philippe Gerum <rpm@xenomai.org>.
| 2014/06/26 | Xenomai 3.1.2 |
