53f1dc9860
Fixing problems found in the fedora packaging review. There are still problems, but lets get what works out of the door so that it gets into a distro and we can see what is more important to work on from now on. The OLS paper will be included as soon as it is published by the OLS organizers. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
Basic instructions to use ctracer:
|
|
|
|
1. Install dwarves, if you are not that excited about building it I'm
|
|
keeping rpms for Fedora Core 6 here:
|
|
|
|
http://oops.ghostprotocols.net:81/acme/dwarves/rpm/
|
|
|
|
The .src.rpm is there in case you want to rebuild it for another
|
|
rpm based distro.
|
|
|
|
2. build the kernel with CONFIG_DEBUG_INFO=y, i.e. gcc -g, that will
|
|
insert the DWARF info needed by all the pahole tools, ctracer, etc, or
|
|
just install the kernel-debuginfo rpm package on FC6, other distros
|
|
have it with a different name, its just the kernel built with debug
|
|
info.
|
|
|
|
3. Assuming you installed the kernel-debuginfo package, to run ctracer
|
|
on your workstation, just do the following steps:
|
|
|
|
mkdir foo
|
|
cd foo
|
|
ln -s /usr/share/dwarves/runtime/* .
|
|
make CLASS=sock # to trace struct sock methods, this one is safe, try others
|
|
# and tell me your horror (or success :-) ) story.
|
|
|
|
(kbuild gurus, send suggestions to simplify this procedure! :-) )
|
|
|
|
4. load the resulting module:
|
|
|
|
insmod ctracer.ko
|
|
|
|
dmesg will show how many probes were successfully installed
|
|
|
|
5. Do some related activity (ssh, in the above example should do)
|
|
|
|
6. Make sure debugfs is mounted
|
|
|
|
[root@filo ~]# mount -t debugfs none_debugfs /sys/kernel/debug/
|
|
|
|
7. Get the log:
|
|
|
|
cat /sys/kernel/debug/ctracer0 > /tmp/ctracer.log
|
|
|
|
8. Generate the callgraph!
|
|
|
|
make callgraph
|
|
|
|
9. rmmod ctracer
|
|
|
|
Change the shipped Makefile accordingly to build a module for qemu or another test
|
|
machine.
|
|
|
|
The relay transport is mostly ready and will be included in the upcoming changesets.
|