Hi, I am writing to submit a patch set to implement basic support of UST dynamic instrumentation.
Based on the discussion in previous thread [1]: Mathieu Desnoyers <[email protected]> wrote: > Basically, we enable an event targeting: > > - an executable or a shared object, > - a symbol or offset within this executable or object. > > This would be the basic instrumentation mode that would allow > dynamic instrumentation across all processes using the executable or > .so. I've changed the proposed command line interface as follows: # lttng enable-event aname -u Event options: --probe [object@](addr | symbol | symbol+offset) Dynamic probe. - userspace tracer requires specifying an object to instrument. - Addr and offset can be octal (0NNN...), decimal (NNN...) or hexadecimal (0xNNN...) --function [object@](addr | symbol | symbol+offset) Dynamic function entry/return probe. - userspace tracer requires specifying an object to instrument. - Addr and offset can be octal (0NNN...), decimal (NNN...) or hexadecimal (0xNNN...) So the user need to provide a path of the executable of shared library to instrument. Example: # lttng enable-event aevent -u --probe=/tmp/a.out@main # lttng enable-event aevent -u --function=/tmp/a.out@main+0x42 The basic procedure implemented is: After the user execute the lttng enable-event command, lttng-sessiond will send the command to all registered applications. The applications will then check if themselves are to be instrumented (they are the executable specified by user or they loaded the shared library specified by user). If so, the app will notify the sessiond to do the actual instrumentation. Two issues for now: * The patches now assume the event associated with the probe to instrument is already registered. I am working on to eliminate this limitation. * Methods to instrument shared libraries are not implemented yet. The patch set follows in separated mails. Please provide your comments. Thank you! [1] http://lists.lttng.org/pipermail/lttng-dev/2013-August/021056.html -- Best Regards, 仝子飞 (Zifei Tong) _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
