pahole: Describe expected use of 'default' in the man page
[dwarves.git] / README.ctracer
blob33c4014a77519a27f5446036834f580962ee14a1
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
9    rpm based distro.
11    Since fedora 9 you just have to run:
13    yum install dwarves
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
19    info.
21 3. Assuming you installed the kernel-debuginfo package, to run ctracer
22    on your workstation, just do the following steps:
24 mkdir foo
25 cd foo
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:
34 insmod ctracer.ko
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/
44 7. Get the log:
46 cat /sys/kernel/debug/ctracer0 > /tmp/ctracer.log
48 8. Generate the callgraph!
50 make callgraph
52 9. rmmod ctracer
54 Change the shipped Makefile accordingly to build a module for qemu or another test
55 machine.
57 The relay transport is mostly ready and will be included in the upcoming changesets.