sessiond: agent: enable events matching event notifiers
Per event notifier domain agents
--------------------------------
A `struct agent` instance encapsulates the agent events of an agent
domain for a given session. In the context of event notifiers, there is
no session involved to scope the agent instance.
Hence, per-domain instances are maintained to control event-notifiers
enabled by triggers.
Agent event enable count
------------------------
Agents act as a pre-filter on user space tracer events. In order to
honor triggers use event notifiers (on-event-hit conditions), the
register/unregister trigger commands are modified to ensure 'agent'
domain events are created and enabled/disabled suitably for the user
space tracer to be invoked.
Note that since agent events are a "filter" before event enablers, an
event-rule targetting a ring buffer and an identical event-rule
targetting an event notifier can be enabled. The action to take when the
event is hit is completely opaque to the agents. In such cases, the same
agent event instance needs to be enabled and the current implementation
doesn't allow duplicate agent events.
Hence, `struct agent_event`'s enabled state is now a counter which
accounts for all enabled event-rules that require this agent event to be
enabled. The agent event is enabled when one or more event rules
matching it are enabled and it is disabled when that count reached zero.
To ensure no code checks for the agent_event's enabled state by
comparing to '1', a new `AGENT_EVENT_IS_ENABLED` macro is introduced.
The existing code using the `enabled` attribute directly is modified to
use it.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I363db1e4bd7d7d73c75b8576c6323ee41e31aa00
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
16 files changed:
This page took 0.029153 seconds and 5 git commands to generate.