update ust
[lttv.git] / trunk / lttv / doc / developer / ust.html
... / ...
CommitLineData
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4 <title>LTTng User-space Tracing Design</title>
5</head>
6 <body>
7
8<h1>LTTng User-space Tracing Design</h1>
9
10<p>
11A user-space application may contain static instrumentation, and be linked with
12an associated runtime library, in order to produce an execution trace. User
13space Tracepoints and Markers, analogous to Kernel Tracepoints and Markers,
14define program locations and arguments provided. Probes may then be connected to
15each Tracepoint and Marker before they are activated. The probes will typically
16call LTTng user-space event writing functions.
17
18<p>
19When the instrumented application starts, a pipe is opened to allow external
20tracing control, asynchronous notification is requested when commands arrive in
21the pipe, and a signal handler is installed for SIGIO (or a carefully chosen
22chainable signal number). Every time such signal is received, the runtime
23library checks for commands received on the external tracing control pipe. The
24recognized commands are:
25
26<li> list the available Markers and Tracepoints;
27<li> dynamically load a library (presumably containing probes to connect);
28<li> connect a probe to a Tracepoint or Marker;
29<li> activate a Tracepoint or Marker;
30<li> initialize the tracing buffers;
31<li> flush the tracing buffers;
32<li> finalize the tracing buffers;
33
34<p>
35The application may also spontaneously provide information to the pipe:
36
37<li> a buffer is full;
38<li> new tracepoints or markers are appearing or disappearing, because modules are
39 dynamically loaded or unloaded;
40
41<p>
42In addition, the tracing control application should be notified when the
43application exits (to save the content of buffers if the application is
44crashing). Such notification may be obtained through utrace.
45<p>
46This tracing scheme plans to use a direct function call to tracing into buffers
47mapped in user-space. This should be an order of magnitude faster than the
48current Dtrace implementation (c.f.
49<a href="http://ltt.polymtl.ca/tracingwiki/index.php/DTrace">Dtrace information
50on the TracingWiki</a>) which uses a breakpoint to
51perform both dynamic and static user-space tracing. Performance comparison of
52a function call vs the int3 approach is available at
53<a href="http://sourceware.org/ml/systemtap/2006-q3/msg00793.html">Markers vs
54int3 performance comparison</a> (see "Conclusion").
55
56Tracing of Java application is planned to be done through a JNI interface.
57Linking standard low-level C tracing library to the application within a JNI
58adaptation class will be required to trace Java events. This has been prototyped
59in the past. The work is available here for older LTTng versions :
60<a href="http://ltt.polymtl.ca/svn/trunk/obsolete/ltt-usertrace/java/"</a>.
61
62 </body>
63</html>
This page took 0.022915 seconds and 4 git commands to generate.