Unregister tracepoint probes when not needed
Ensure tracepoint probes are only connected when we meet these
conditions:
at least one enabler enables event && session active && channel enabled
We introduce a "tstate" flag in addition to "active/enabled".
Active and enabled fields are used to atomically enable/disable session
and channel, whereas the tstate flag is a "transient state" enable
state. It is used to update all events following a state change
transition. The actual effect of the state transition is committed
atomically with store to active/enabled flag.
Upon enable, we do:
tstate = 1
update all events
enable = 1;
Upon disable, we do the opposite:
enable = 0;
tstate = 0;
update all events
The purpose of this scheme is to allow atomic enable/disable of events
while allowing per-event probe registration to be performed
non-atomically.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.025708 seconds and 4 git commands to generate.