A context is basically extra information appended to a channel. For instance,
you could ask the tracer to add the PID information for all events in a
channel. You can also add performance monitoring unit counters (perf PMU) using
-the perf kernel API).
+the perf kernel API.
-For example, this command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events in the trace
+For example, this command will add the context information 'prio' and two per-CPU
+perf counters (hardware branch misses and cache misses), to all events in the trace
data output:
.nf
-# lttng add-context \-k \-t prio \-t perf:branch-misses \\
- \-t perf:cache-misses
+# lttng add-context \-k \-t prio \-t perf:cpu:branch-misses \\
+ \-t perf:cpu:cache-misses
.fi
Please take a look at the help (\-h/\-\-help) for a detailed list of available
contexts.
+Perf counters are available as per-CPU ("perf:cpu:...") and per-thread
+("perf:thread:...") counters. Currently, per-CPU counters can only be
+used with the kernel tracing domain, and per-thread counters can only be
+used with the UST tracing domain.
+
If no channel is given (\-c), the context is added to all channels that were
already enabled. If the session has no channel, a default channel is created.
Otherwise the context will be added only to the given channel (\-c).
# lttng create calibrate-function
# lttng enable-event calibrate \-\-kernel \\
\-\-function lttng_calibrate_kretprobe
-# lttng add-context \-\-kernel \-t perf:LLC-load-misses \\
- \-t perf:LLC-store-misses \\
- \-t perf:LLC-prefetch-misses
+# lttng add-context \-\-kernel \-t perf:cpu:LLC-load-misses \\
+ \-t perf:cpu:LLC-store-misses \\
+ \-t perf:cpu:LLC-prefetch-misses
# lttng start
# for a in $(seq 1 10); do \\
lttng calibrate \-\-kernel \-\-function;
.BR "\-\-syscall"
System call event. Enabling syscalls tracing (kernel tracer), you will
not be able to disable them with disable-event. This is a known
-limitation. You can disable the entire channel to do the trick.
+limitation. You can disable the entire channel to do the trick. Also note
+that per-syscall selection is not supported yet. Use with "-a" to enable
+all syscalls.
.TP
.BR "\-\-filter 'expression'"
Set a filter on a newly enabled event. Filter expression on event
Disable tracing channel
Disabling a channel disables the tracing of all of the channel's events. A channel
-can be reenabled by calling \fBlttng enable-channel NAME\fP again.
+can be re-enabled by calling \fBlttng enable-channel NAME\fP again.
If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
file.