Project

General

Profile

Actions

Feature #1057

open

List only contexts that apply to a domain

Added by Matthew Khouzam over 7 years ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/09/2016
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Erica Bugden 10 months 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."

Actions #2

Updated by Mathieu Desnoyers 10 months 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.

Actions

Also available in: Atom PDF