From: Bhaskar Chowdhury <unixbhaskar@gmail.com>
To: mhiramat@kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Cc: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Subject: [PATCH] tools:bootconfig:scripts: Put back the comments where they should be
Date: Wed, 21 May 2025 17:16:51 +0530 [thread overview]
Message-ID: <20250521115018.32392-1-unixbhaskar@gmail.com> (raw)
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 <unixbhaskar@gmail.com>
---
tools/bootconfig/scripts/ftrace.sh | 35 ++++++++++++++++++++----------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/tools/bootconfig/scripts/ftrace.sh b/tools/bootconfig/scripts/ftrace.sh
index 186eed923041..e2a075879db4 100644
--- a/tools/bootconfig/scripts/ftrace.sh
+++ b/tools/bootconfig/scripts/ftrace.sh
@@ -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
next reply other threads:[~2025-05-21 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 11:46 Bhaskar Chowdhury [this message]
2025-06-20 0:41 ` [PATCH] tools:bootconfig:scripts: Put back the comments where they should be Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250521115018.32392-1-unixbhaskar@gmail.com \
--to=unixbhaskar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).