1 Basic instructions to use ctracer:
3 1. Install dwarves, if you are not that excited about building it I'm
4 keeping rpms for Fedora Core 6 here:
6 http://oops.ghostprotocols.net:81/acme/dwarves/rpm/
8 The .src.rpm is there in case you want to rebuild it for another
11 Since fedora 9 you just have to run:
15 2. build the kernel with CONFIG_DEBUG_INFO=y, i.e. gcc -g, that will
16 insert the DWARF info needed by all the pahole tools, ctracer, etc, or
17 just install the kernel-debuginfo rpm package on FC6, other distros
18 have it with a different name, its just the kernel built with debug
21 3. Assuming you installed the kernel-debuginfo package, to run ctracer
22 on your workstation, just do the following steps:
26 ln -s /usr/share/dwarves/runtime/* .
27 make CLASS=sock # to trace struct sock methods, this one is safe, try others
28 # and tell me your horror (or success :-) ) story.
30 (kbuild gurus, send suggestions to simplify this procedure! :-) )
32 4. load the resulting module:
36 dmesg will show how many probes were successfully installed
38 5. Do some related activity (ssh, in the above example should do)
40 6. Make sure debugfs is mounted
42 [root@filo ~]# mount -t debugfs none_debugfs /sys/kernel/debug/
46 cat /sys/kernel/debug/ctracer0 > /tmp/ctracer.log
48 8. Generate the callgraph!
54 Change the shipped Makefile accordingly to build a module for qemu or another test
57 The relay transport is mostly ready and will be included in the upcoming changesets.