From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>
Subject: [PATCH 4/6] perf lock: Fix lock name length check for printing
Date: Tue, 4 Jan 2022 10:20:52 -0800 [thread overview]
Message-ID: <20220104182054.25009-5-namhyung@kernel.org> (raw)
In-Reply-To: <20220104182054.25009-1-namhyung@kernel.org>
It has 20 character spaces for name so lock names shorter than 20
should be printed without ellipsis.
Before:
# perf lock report
Name acquired contended avg wait (ns) total wait (ns) max wait (ns) min wait (ns)
rcu_read_lock 251225 0 0 0 0 0
&(ei->i_block_re... 8731 0 0 0 0 0
&sb->s_type->i_l... 8731 0 0 0 0 0
hrtimer_bases.lo... 5261 0 0 0 0 0
hrtimer_bases.lo... 2626 0 0 0 0 0
hrtimer_bases.lo... 1953 0 0 0 0 0
hrtimer_bases.lo... 1382 0 0 0 0 0
cpu_hotplug_lock... 1350 0 0 0 0 0
After:
# perf lock report
Name acquired contended avg wait (ns) total wait (ns) max wait (ns) min wait (ns)
rcu_read_lock 251225 0 0 0 0 0
&(ei->i_block_re... 8731 0 0 0 0 0
&sb->s_type->i_l... 8731 0 0 0 0 0
hrtimer_bases.lock 5261 0 0 0 0 0
hrtimer_bases.lock 2626 0 0 0 0 0
hrtimer_bases.lock 1953 0 0 0 0 0
hrtimer_bases.lock 1382 0 0 0 0 0
cpu_hotplug_lock 1350 0 0 0 0 0
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 8078f7ca826d..f6adf3cdd1e2 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -710,7 +710,7 @@ static void print_result(void)
}
bzero(cut_name, 20);
- if (strlen(st->name) < 16) {
+ if (strlen(st->name) < 20) {
/* output raw name */
pr_info("%20s ", st->name);
} else {
--
2.34.1.448.ga2b2bfdf31-goog
next prev parent reply other threads:[~2022-01-04 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 18:20 [PATCHSET 0/6] perf lock: Random updates for the locking analysis (v1) Namhyung Kim
2022-01-04 18:20 ` [PATCH 1/6] perf lock: Convert lockhash_table to use hlist Namhyung Kim
2022-01-04 18:20 ` [PATCH 2/6] perf lock: Change type of lock_stat->addr to u64 Namhyung Kim
2022-01-04 18:20 ` [PATCH 3/6] perf lock: Sort map info based on class name Namhyung Kim
2022-01-04 18:20 ` Namhyung Kim [this message]
2022-01-04 18:20 ` [PATCH 5/6] perf lock: Add -c/--combine-locks option Namhyung Kim
2022-01-04 18:20 ` [PATCH 6/6] perf lock: Carefully combine lock stats for discarded entries Namhyung Kim
2022-01-09 13:13 ` [PATCHSET 0/6] perf lock: Random updates for the locking analysis (v1) Jiri Olsa
-- strict thread matches above, loose matches on Subject: below --
2022-01-27 0:00 [PATCHSET 0/6] perf lock: Random updates for the locking analysis (v2) Namhyung Kim
2022-01-27 0:00 ` [PATCH 4/6] perf lock: Fix lock name length check for printing Namhyung Kim
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=20220104182054.25009-5-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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