linux/tools/perf/ui
Ian Rogers 2e9f9d4a72 perf annotation: Switch lock from a mutex to a sharded_mutex
Remove the "struct mutex lock" variable from annotation that is
allocated per symbol. This removes in the region of 40 bytes per
symbol allocation. Use a sharded mutex where the number of shards is
set to the number of CPUs. Assuming good hashing of the annotation
(done based on the pointer), this means in order to contend there
needs to be more threads than CPUs, which is not currently true in any
perf command. Were contention an issue it is straightforward to
increase the number of shards in the mutex.

On my Debian/glibc based machine, this reduces the size of struct
annotation from 136 bytes to 96 bytes, or nearly 30%.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Yuan Can <yuancan@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: https://lore.kernel.org/r/20230615040715.2064350-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-06-20 17:04:21 -07:00
..
browsers perf annotation: Switch lock from a mutex to a sharded_mutex 2023-06-20 17:04:21 -07:00
gtk tools: Rename __fallthrough to fallthrough 2023-04-06 21:41:00 -03:00
stdio perf thread: Add accessor functions for thread 2023-06-12 15:57:53 -03:00
tui perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
browser.c perf ui: Update use of pthread mutex 2022-10-04 08:55:20 -03:00
browser.h perf annotate: Fix fused instr logic for assembly functions 2021-09-18 17:43:05 -03:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
helpline.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
helpline.h perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
hist.c perf thread: Add reference count checking 2023-06-12 15:57:53 -03:00
keysyms.h perf report: Support a new key to reload the browser 2020-03-24 09:37:27 -03:00
libslang.h perf build: Handle slang being in /usr/include and in /usr/include/slang/ 2019-06-18 17:48:12 -03:00
progress.c perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
progress.h Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
setup.c perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
ui.h perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
util.c perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode 2022-10-27 16:37:26 -03:00
util.h tools ui popup: Allow returning hotkeys 2020-01-06 11:46:10 -03:00