Feature #1057
openList only contexts that apply to a domain
0%
Description
lttng add-context adds a context. There is no way to remove an added context. There is no way to know if the context applies to the domain of the channel.
ex: lttng add-context --kernel --list would return only the contexts that apply to kernel, for example "perf:thread:cs" would not be in that list.
This will enable more intuitive control than the current message of:
Error: perf:thread:cs: Add kernel context failed
Warning: Some command(s) went wrong
Updated by Erica Bugden over 1 year ago
Adding another expected behaviour example. Quoted from email.
"E.g. from the lttng-add-context man page:
• A perf counter name: Per-CPU Prefix: perf:cpu: Only available with the --kernel option. Per-thread Prefix: perf:thread: Only available with the --userspace, --jul, or --log4j option.
So I would expect "lttng add-context --list --kernel" to only
show the "perf:cpu:" perf contexts.
And the "lttng add-context --list --userspace" to show only
the "perf:thread:" perf contexts."
If this is added, we should also "augment the add-context man page to explain that people can now use the domains with --list."
Updated by Mathieu Desnoyers over 1 year ago
There are also cases where contexts like "pid, tid" only apply to kernel domain, and "vpid, vtid" can be used in both kernel and userspace domains.
When doing those lists, we should run try of the context in a script to identify which are supported in each domain.