Bug 207781

Summary: Add trace-cmd set command
Product: Tools Reporter: Steven Rostedt (rostedt)
Component: Trace-cmd/KernelsharkAssignee: Default virtual assignee for Trace-cmd and kernelshark (tools_tracecmd_kernelshark)
Status: RESOLVED CODE_FIX    
Severity: enhancement    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: N/A Subsystem:
Regression: No Bisected commit-id:

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"")