Implement event notifier
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 29 Nov 2019 21:35:45 +0000 (16:35 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Nov 2020 18:20:41 +0000 (13:20 -0500)
commitd8d2416dab454962b90222ba46c82cdce0c666a4
treeb47475909448b3b76ffbad3ca875c0faa1307646
parent8968a99fff433db0ce9268ed8f4107ddaf072186
Implement event notifier

The event notifier feature allows the user to get notify through a pipe
that an callsite was reached. It's really similar to a regular UST event
in that firing can be controlled by filters and exclusions. It diverges
because firing a event notifier does not end up writing to the tracing
buffers. In fact, event notifiers live outside of any sessions (i.e. no
session is needed).

Definitions
===========
A `Event notifier` is defined as an event description (event name, log level,
etc.) and a unique event notifier token.

A `Event notifier group` is a set of event notifiers sharing the same
pipe to the liblttng-ust-ctl user.

Sequence of operations
======================
  event_notifier_group_handle = ustctl_create_event_notifier_group(notification_fd)
  event_notifier_handle = ustctl_create_event_notifier(event_notifier_group_handle, event_notifier_id);
  ustctl_set_filter(event_notifier_handle, filter)
  ustctl_set_exclusion(event_notifier_handle, exclusion)
  ustctl_enable(event_notifier_handle)
  ...
  ustctl_disable(event_notifier_handle)
  ustctl_release_object(event_notifier_handle)
  ustctl_release_object(event_notifier_group_handle)

Highlevel changes
=================
- Add the event notifier probe generation macros,
- Add event notifier enabling/disabling machinery,
- Add event notifier filter machinery,
- Add event notifier exclusion machinery,
- Expose ABI structures
- Expose ABI enums
- Expose ABI cmds
- Expose ustctl functions

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I493d784cc6830cd6c7979f6f08b209521676f05c
17 files changed:
include/lttng/ust-abi.h
include/lttng/ust-ctl.h
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
include/ust-comm.h
liblttng-ust-comm/lttng-ust-comm.c
liblttng-ust-ctl/ustctl.c
liblttng-ust/Makefile.am
liblttng-ust/context-provider-internal.h [new file with mode: 0644]
liblttng-ust/event-notifier-notification.c [new file with mode: 0644]
liblttng-ust/lttng-context-provider.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-filter.c
liblttng-ust/lttng-probes.c
liblttng-ust/lttng-ust-abi.c
liblttng-ust/lttng-ust-comm.c
liblttng-ust/ust-events-internal.h
This page took 0.034892 seconds and 5 git commands to generate.