7 Here is a simpler, but slower, version of user space tracing design.
9 It will be useful on architectures where doing a system call is mandatory, for
10 example when CPUs are lacking a 64 bits TSC : it must be worked around by doing
11 a system call to the the time or the synthetic MSB of the TSC (yes, disabling
12 preemption is at least required).
15 So the design is simple :
19 One system call for event logging
47 If a facility is registered twice, the same handle is used.
48 For a facility to be the exact same, it must share _every_ element of the
49 struct (even type sizes).
50 Potential problem : If a facility is registered, it is never unregistered.
52 Now.. not being able to free facilities when they are not used is not fun. So
53 how can we know every process that has registered a facility have finished using
54 it ? If we know that, we might do a cleanup when _all_ the traces are destroyed:
55 this is way better than a reboot.
57 A solution might be to keep a reference count to the fac_id : it would be
58 incremented upon registration and decremented when a process exits. To do that,
59 a process must keep an array of fac ids it uses. 0 is unset.
63 CONFIG_LTT_USERSPACE_GENERIC