userspace tracing lite
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 3 Mar 2006 05:38:18 +0000 (05:38 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 3 Mar 2006 05:38:18 +0000 (05:38 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1571 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/doc/developer/lttng-userspace-tracing-lite.txt [new file with mode: 0644]

diff --git a/ltt/branches/poly/doc/developer/lttng-userspace-tracing-lite.txt b/ltt/branches/poly/doc/developer/lttng-userspace-tracing-lite.txt
new file mode 100644 (file)
index 0000000..fe63f0d
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+Mathieu Desnoyers
+
+March 2006
+
+Here is a simpler, but slower, version of user space tracing design.
+
+It will be useful on architectures where doing a system call is mandatory, for
+example when CPUs are lacking a 64 bits TSC : it must be worked around by doing
+a system call to the the time or the synthetic MSB of the TSC (yes, disabling
+preemption is at least required).
+
+
+So the design is simple :
+
+Two system calls :
+
+One system call for event logging
+
+
+ltt_trace_generic
+args :
+fac_id
+event_id
+data pointer
+data size
+
+ltt_register_generic
+args:
+struct pointer (in)
+fac_id pointer (out)
+
+#define NAME_MAX 4096
+
+struct :
+char name[NAME_MAX]
+u32 num_events
+u32 checksum
+u32 alignment
+u32 int_size
+u32 long_size
+u32 pointer_size
+u32 size_t_size
+
+
+If a facility is registered twice, the same handle is used.
+       For a facility to be the exact same, it must share _every_ element of the
+       struct (even type sizes).
+Potential problem : If a facility is registered, it is never unregistered.
+
+Now.. not being able to free facilities when they are not used is not fun. So
+how can we know every process that has registered a facility have finished using
+it ? If we know that, we might do a cleanup when _all_ the traces are destroyed:
+this is way better than a reboot.
+
+A solution might be to keep a reference count to the fac_id : it would be
+incremented upon registration and decremented when a process exits. To do that,
+a process must keep an array of fac ids it uses. 0 is unset.
+
+CONFIG option :
+
+CONFIG_LTT_USERSPACE_GENERIC
+
+
+
+
+
+
This page took 0.024431 seconds and 4 git commands to generate.