Add context fields to a channel:
[verse]
-*lttng* ['GENERAL OPTIONS'] *add-context*
+*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context*
(option:--kernel | option:--userspace | option:--jul | option:--log4j)
[option:--session='SESSION'] [option:--channel='CHANNEL']
option:--type='TYPE' [option:--type='TYPE']...
List the available context fields:
[verse]
-*lttng* ['GENERAL OPTIONS'] *add-context* --list
+*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context* option:--list
DESCRIPTION
The `lttng add-context` command adds one or more context fields to a
channel.
-Channels are created with the linklttng:lttng-enable-channel(1) command.
+Channels are created with the man:lttng-enable-channel(1) command.
When context fields are added to a channel, all the events emitted
within this channel contain the dynamic values of those context fields.
can only be used in the Linux kernel tracing domain, while per-thread
counters can only be used in the user space tracing domain.
+It is also possible to enable PMU counters by raw ID using the
+`perf:cpu:raw:r<N>:<name>` or `perf:thread:raw:r<N>:<name>` format for
+the kernel and user-space respectively. `<N>` is a hexadecimal event
+descriptor which is the same format as used by perf-record(1): a
+concatenation of the `Umask value` and `Event number` provided by the
+processor's manufacturer. The possible values for this field are
+processor-specific. The `<name>` field is used to associate a clearer
+name to the counter.
+
Application-specific context fields can be added to a channel using the
following syntax:
'TYPE'::
Context type name.
+NOTE: Make sure to **single-quote** the type when running the command
+from a shell, as `$` is a special character for variable substitution in
+most shells.
+
Use the option:--list option without other arguments to list the
available context field names.
SEE ALSO
--------
-linklttng:lttng(1)
+man:lttng(1)