Bug 207781 - Add trace-cmd set command
Summary: Add trace-cmd set command
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: Trace-cmd/Kernelshark (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Default virtual assignee for Trace-cmd and kernelshark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 01:18 UTC by Steven Rostedt
Modified: 2020-07-08 00:33 UTC (History)
0 users

See Also:
Kernel Version: N/A
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Steven Rostedt 2020-05-19 01:18:57 UTC
Add a "set" command that can set and unset values like "start" does without doing anything else (clearing the tracer).

For example, to set the option "irq-info", simply do:

 # trace-cmd set -O irq-info

Or to turn it off:

 # trace-cmd set -O noirq-info

Basically, it will do any command that trace-cmd start can do, but without resetting or modifying anything else. Even let it change the current tracer or enable or disable events:

 # trace-cmd set -p function

Will be just like: echo function > /sys/kernel/tracing/current_tracer

Enable an event:

 # trace-cmd set -e sched_switch

Or disable an event:

 # trace-cmd set -v -e sched_switch

Allow it to take multiple arguments to do things in the order that they are.
Comment 1 Steven Rostedt 2020-07-08 00:33:58 UTC
add by commit: 2472341afc9b ("trace-cmd: Add new subcommand "set"")

Note You need to log in before you can comment on or make changes to this bug.