From 0d435bf8c3f4d01d9547e87237977191573c6f5a Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Wed, 26 Jan 2022 16:00:49 -0800 Subject: perf lock: Add -c/--combine-locks option The -c or --combine-locks option is to merge lock instances in the same class into a single entry. It compares the name of the locks and marks duplicated entries using lock_stat->combined. # 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 hrtimer_bases.lock 1273 0 0 0 0 0 hrtimer_bases.lock 1269 0 0 0 0 0 # perf lock report -c Name acquired contended avg wait (ns) total wait (ns) max wait (ns) min wait (ns) rcu_read_lock 251225 0 0 0 0 0 hrtimer_bases.lock 39450 0 0 0 0 0 &sb->s_type->i_l... 10301 1 662 662 662 662 ptlock_ptr(page) 10173 2 701 1402 760 642 &(ei->i_block_re... 8732 0 0 0 0 0 &xa->xa_lock 8088 0 0 0 0 0 &base->lock 6705 0 0 0 0 0 &p->pi_lock 5549 0 0 0 0 0 &dentry->d_lockr... 5010 4 1274 5097 1844 789 &ep->lock 3958 0 0 0 0 0 Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220127000050.3011493-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/perf-lock.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/Documentation') diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index 1b4d452923d7..f5eb95788969 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -54,6 +54,10 @@ REPORT OPTIONS Sorting key. Possible values: acquired (default), contended, avg_wait, wait_total, wait_max, wait_min. +-c:: +--combine-locks:: + Merge lock instances in the same class (based on name). + INFO OPTIONS ------------ -- cgit