Commit 84b91920 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

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: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarIan Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d783ea8f
...@@ -155,6 +155,7 @@ CONTENTION OPTIONS ...@@ -155,6 +155,7 @@ CONTENTION OPTIONS
--tid=<value>:: --tid=<value>::
Record events on existing thread ID (comma separated list). Record events on existing thread ID (comma separated list).
-M::
--map-nr-entries=<value>:: --map-nr-entries=<value>::
Maximum number of BPF map entries (default: 10240). Maximum number of BPF map entries (default: 10240).
......
...@@ -2294,7 +2294,7 @@ int cmd_lock(int argc, const char **argv) ...@@ -2294,7 +2294,7 @@ int cmd_lock(int argc, const char **argv)
"Trace on existing process id"), "Trace on existing process id"),
OPT_STRING(0, "tid", &target.tid, "tid", OPT_STRING(0, "tid", &target.tid, "tid",
"Trace on existing thread id (exclusive to --pid)"), "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), "Max number of BPF map entries", parse_map_entry),
OPT_CALLBACK(0, "max-stack", &max_stack_depth, "num", OPT_CALLBACK(0, "max-stack", &max_stack_depth, "num",
"Set the maximum stack depth when collecting lopck contention, " "Set the maximum stack depth when collecting lopck contention, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment