X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fman%2Flttng-add-context.1.txt;h=640da1db1309dda5c81c466dc78a994e01cacc41;hp=26df16d2b37fb102587120dcfa6c2ec784b65b43;hb=763f0d4cef1438d3f1f5f5c5a232d72628bca550;hpb=2e4886b88e065d5d6b089d3d4d92ef06434fe5d1 diff --git a/doc/man/lttng-add-context.1.txt b/doc/man/lttng-add-context.1.txt index 26df16d2b..640da1db1 100644 --- a/doc/man/lttng-add-context.1.txt +++ b/doc/man/lttng-add-context.1.txt @@ -1,5 +1,6 @@ lttng-add-context(1) ==================== +:revdate: 5 Februrary 2018 NAME @@ -12,7 +13,7 @@ SYNOPSIS 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']... @@ -20,7 +21,7 @@ Add context fields to a channel: List the available context fields: [verse] -*lttng* ['GENERAL OPTIONS'] *add-context* --list +*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *add-context* option:--list DESCRIPTION @@ -28,7 +29,7 @@ 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. @@ -45,6 +46,19 @@ per-thread (`perf:thread:` prefix) counters. Currently, per-CPU counters 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:rN:NAME` (Linux kernel tracing domain) or +`perf:thread:raw:rN:NAME` (user space tracing domain), with: + +`N`:: + A hexadecimal event descriptor which is the same format as used + by man:perf-record(1): a concatenation of the event number and umask + value provided by the processor's manufacturer. The possible values + for this field are processor-specific. + +`NAME`:: + Custom name to easily recognize the counter. + Application-specific context fields can be added to a channel using the following syntax: @@ -59,9 +73,15 @@ with: '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 the <> section below for a list of +limitations to consider. include::common-cmd-options-head.txt[] @@ -85,11 +105,11 @@ option:-u, option:--userspace:: Target ~~~~~~ -option:-c, option:--channel='CHANNEL':: +option:-c 'CHANNEL', option:--channel='CHANNEL':: Add context fields to a channel named 'CHANNEL' instead of adding them to all the channels. -option:-s, option:--session='SESSION':: +option:-s 'SESSION', option:--session='SESSION':: Add context fields to a channel in the tracing session named 'SESSION' instead of the current tracing session. @@ -99,17 +119,23 @@ Context option:--list:: List the available context fields. Use this option alone. -option:-t, option:--type='TYPE':: +option:-t 'TYPE', option:--type='TYPE':: Add context field named 'TYPE'. This option can be repeated as many times as needed on the command-line. include::common-cmd-help-options.txt[] +[[limitations]] +LIMITATIONS +----------- +As of this version of LTTng, it is not possible to add context fields to +a channel once its tracing session has been started (see man:lttng-start(1)) +at least once. include::common-cmd-footer.txt[] SEE ALSO -------- -linklttng:lttng(1) +man:lttng(1)