[lttng-dev] [RFC] New LTTng domain attributes (buffer/include/exclude)

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Wed Mar 6 13:03:13 EST 2013


Hi,

Following a discussion with other LTTng forks, we are coming up with the
following idea to make soon-to-come per-user-id shared buffers for UST
tracing. We'd like to get your feedback.

Here is the idea:

Both for per-process and per-uid (shared) buffers, we'd be working on
the UST domain (-u/--userspace).

We plan to add new attributes to domains:
  --buffers-pid: per PID buffers (current UST 2.0/2.1 behavior)
  --buffers-uid: per user ID buffers (upcoming in UST 2.2)
  --buffers-global: buffers shared across the system (e.g. kernel tracing)

The UST default would stay "--buffers-pid", so just specifying "-u"
without attribute would not change the current behavior.

We plan on doing shortcuts, such as:

  -U: shortcut for -u --buffers-uid

So we can do:

lttng enable-event -U someeventA
lttng enable-event -U someeventB

rather than having to spell out the attribute argument for each
enable-event/enable-channel.

Other future attributes we plan on adding are inclusion/exclusion lists,
followed by a comma-separated list:

  --include-pid 22,33,44
  --include-uid 0,5
  --exclude-pid 12,55
  --exclude-uid 22

We believe these attributes will allow us to add those new configuration
parameters to the toolchain without confusing users.

At the API level (lttng.h), new attribute fields would be added to
struct lttng_domain. The inclusion/exclusion lists would probably be
separate "domain_set_attribute" APIs.

Thoughts ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list