tools:bootconfig:scripts: Put back the comments where they should be
Subsystems (2)
PATCH 1/1 tools:bootconfig:scripts: Put back the comments where they should be
Mundane adjustment to the comments, where they should belong.
Does it change the functionality? NO
Does it improve the readability? Probably and that is why.
Signed-off-by Bhaskar Chowdhury <[email protected]>
--- tools/bootconfig/scripts/ftrace.sh | 35 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-)
tools/bootconfig/scripts/ftrace.sh +24 -11
@@ -1,23 +1,28 @@ # SPDX-License-Identifier: GPL-2.0-only -clear_trace() { # reset trace output - echo > trace + # reset trace output +clear_trace() { + + echo > trace } -disable_tracing() { # stop trace recording +# stop trace recording +disable_tracing() { echo 0 > tracing_on } -enable_tracing() { # start trace recording +# start trace recording +enable_tracing() { echo 1 > tracing_on } -reset_tracer() { # reset the current tracer +# reset the current tracer +reset_tracer() { echo nop > current_tracer } +# remove action triggers first reset_trigger_file() { - # remove action triggers first grep -H ':on[^:]*(' $@ | while read line; do cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["`
@@ -32,21 +37,25 @@ reset_trigger_file() { done } -reset_trigger() { # reset all current setting triggers +# reset all current setting triggers +reset_trigger() { if [ -d events/synthetic ]; then reset_trigger_file events/synthetic/*/trigger fi reset_trigger_file events/*/*/trigger } -reset_events_filter() { # reset all current setting filters +# reset all current setting filters +reset_events_filter() { grep -v ^none events/*/*/filter | while read line; do echo 0 > `echo $line | cut -f1 -d:` done } -reset_ftrace_filter() { # reset all triggers in set_ftrace_filter +# reset all triggers in set_ftrace_filter + +reset_ftrace_filter() { if [ ! -f set_ftrace_filter ]; then return 0 fi
@@ -78,17 +87,21 @@ disable_events() { echo 0 > events/enable } -clear_synthetic_events() { # reset all current synthetic events +# reset all current synthetic events + + clear_synthetic_events() { grep -v ^# synthetic_events | while read line; do echo "!$line" >> synthetic_events done } -initialize_ftrace() { # Reset ftrace to initial-state +# Reset ftrace to initial-state # As the initial state, ftrace will be set to nop tracer, # no events, no triggers, no filters, no function filters, # no probes, and tracing on. + +initialize_ftrace() { disable_tracing reset_tracer reset_trigger
--
2.49.0
Masami Hiramatsu (Google)
maintainerQuoted 65 lines · On Wed, 21 May 2025 17:16:51 +0530 Bhaskar Chowdhury <[email protected]>…
Mundane adjustment to the comments, where they should belong.
Does it change the functionality? NO
Does it improve the readability? Probably and that is why.
Signed-off-by Bhaskar Chowdhury <[email protected]>--- tools/bootconfig/scripts/ftrace.sh | 35 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-)tools/bootconfig/scripts/ftrace.sh +14
-8@@ -1,23 +1,28 @@ # SPDX-License-Identifier: GPL-2.0-only -clear_trace() { # reset trace output - echo > trace + # reset trace output +clear_trace() { + + echo > trace } -disable_tracing() { # stop trace recording +# stop trace recording +disable_tracing() { echo 0 > tracing_on } -enable_tracing() { # start trace recording +# start trace recording +enable_tracing() { echo 1 > tracing_on } -reset_tracer() { # reset the current tracer +# reset the current tracer +reset_tracer() { echo nop > current_tracer } +# remove action triggers first reset_trigger_file() { - # remove action triggers first grep -H ':on[^:]*(' $@ | while read line; do cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["`@@ -32,21 +37,25 @@ reset_trigger_file() { done } -reset_trigger() { # reset all current setting triggers +# reset all current setting triggers +reset_trigger() { if [ -d events/synthetic ]; then reset_trigger_file events/synthetic/*/trigger fi reset_trigger_file events/*/*/trigger } -reset_events_filter() { # reset all current setting filters +# reset all current setting filters
tools/bootconfig/scripts/ftrace.sh reset_trigger_file() { · line 57
Quoted 10 lines
tools/bootconfig/scripts/ftrace.sh +3
-1+reset_events_filter() { grep -v ^none events/*/*/filter | while read line; do echo 0 > `echo $line | cut -f1 -d:` done } -reset_ftrace_filter() { # reset all triggers in set_ftrace_filter +# reset all triggers in set_ftrace_filter +
Why this has an empty line after comment?
tools/bootconfig/scripts/ftrace.sh disable_events() { · line 91
Quoted 11 lines
tools/bootconfig/scripts/ftrace.sh +3
-1+reset_ftrace_filter() { if [ ! -f set_ftrace_filter ]; then return 0 fi@@ -78,17 +87,21 @@ disable_events() { echo 0 > events/enable } -clear_synthetic_events() { # reset all current synthetic events +# reset all current synthetic events +
Ditto.
tools/bootconfig/scripts/ftrace.sh disable_events() { · line 103
Quoted 13 lines
tools/bootconfig/scripts/ftrace.sh +3
-1+ clear_synthetic_events() { grep -v ^# synthetic_events | while read line; do echo "!$line" >> synthetic_events done } -initialize_ftrace() { # Reset ftrace to initial-state +# Reset ftrace to initial-state # As the initial state, ftrace will be set to nop tracer, # no events, no triggers, no filters, no function filters, # no probes, and tracing on. +
Here too.
Quoted 7 lines
tools/bootconfig/scripts/ftrace.sh +1
-1+initialize_ftrace() { disable_tracing reset_tracer reset_trigger --2.49.0
Thanks,
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>