[lttng-dev] Dynamic instrumentation GSoC project summary
Zifei Tong
soariez at gmail.com
Thu Sep 26 11:15:48 EDT 2013
Hi,
I am writing to summarize the dynamic instrumentation GSoC project
that I've been working on these months as GSoC this year is ending
tomorrow.
Tl;dr, Now I've got function entry/return probe working.
Here is a demo:
# lttng create
# lttng enable-event test:call_foo -u --function=a.out at foo
# lttng start
# ./a.out
# lttng stop
# lttng view
[23:39:20.532657537] (+?.?????????) localhost test:call_foo_entry: {
cpu_id = 2 }, { }
[23:39:21.532754457] (+1.000096920) localhost test:call_foo_exit: {
cpu_id = 3 }, { }
[23:39:21.532760289] (+0.000005832) localhost test:call_foo_entry: {
cpu_id = 3 }, { }
[23:39:22.532848166] (+1.000087877) localhost test:call_foo_exit: {
cpu_id = 3 }, { }
[23:39:22.532851235] (+0.000003069) localhost test:call_foo_entry: {
cpu_id = 3 }, { }
[23:39:23.532936283] (+1.000085048) localhost test:call_foo_exit: {
cpu_id = 3 }, { }
........
You can find the full demo at [4, 5].
If you want to try and test it now, you can pull the code form [0, 1]
(in dynamic-inst branch). Make sure you have dyninst [2] installed and
configure lttng-tools with '--with-dyninst' option.
After I do some more tests and review/refactor the code, I'll send
patches for review.
I am sorry that the progress is behind schedule. The next two things
on my TODO list is shared library instrumentation and dynamic probe
(like kprobes).
Meanwhile, I and Suchakra are working on methods to do dynamic
instrumentation without dyninst (codename kaji) [3] (inspired by gdb's
tracepoint and Debug-Agent-Library [6]). It now works as a
proof-of-concept with some limitations we are trying to solve. We hope
we can make kaji mature enough to provide an alternative way to do
dynamic instrumentation besides dyninst.
I'd like to thank the LTTng team for giving me the chance to work on
this great project and the support all the way.
Special thanks go to Christian for mentoring me this summer, and also
Suchakra for the discussion and collaboration on kaji.
Thank you!
[0]: https://github.com/5kg/lttng-tools
[1]: https://github.com/5kg/lttng-ust
[2]: http://www.dyninst.org/downloads/dyninst-8.x
[3]: https://github.com/5kg/kaji
[4]: https://gist.github.com/5kg/6570898
[5]: https://github.com/5kg/lttng-tools/tree/dynamic-inst/tests/regression/ust/dynamic-instrument
[6]: https://github.com/MentorEmbedded/Debug-Agent-Library
--
仝子飞 (Zifei Tong)
More information about the lttng-dev
mailing list