From: Namhyung Kim Date: Thu, 6 Apr 2023 21:06:06 +0000 (-0700) Subject: perf lock contention: Use -M for --map-nr-entries X-Git-Tag: v6.6.17~4887^2~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84b91920304f5e640ac922cb721f5c70617a83e8;p=platform%2Fkernel%2Flinux-rpi.git perf lock contention: Use -M for --map-nr-entries Users often want to change the map size, let's add a short option (-M) for that. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index 37aae19..b5e5d08 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -155,6 +155,7 @@ CONTENTION OPTIONS --tid=:: Record events on existing thread ID (comma separated list). +-M:: --map-nr-entries=:: Maximum number of BPF map entries (default: 10240). diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 695ce6b..ef56bf9 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -2294,7 +2294,7 @@ int cmd_lock(int argc, const char **argv) "Trace on existing process id"), OPT_STRING(0, "tid", &target.tid, "tid", "Trace on existing thread id (exclusive to --pid)"), - OPT_CALLBACK(0, "map-nr-entries", &bpf_map_entries, "num", + OPT_CALLBACK('M', "map-nr-entries", &bpf_map_entries, "num", "Max number of BPF map entries", parse_map_entry), OPT_CALLBACK(0, "max-stack", &max_stack_depth, "num", "Set the maximum stack depth when collecting lopck contention, "