perf lock contention: Simplify parse_lock_type()
authorNamhyung Kim <namhyung@kernel.org>
Thu, 6 Apr 2023 21:06:05 +0000 (14:06 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 7 Apr 2023 00:52:17 +0000 (21:52 -0300)
commitd783ea8f62c4e58cea1d04567048368691128d5e
tree6328e2f0a4b4247d5de5e5d770663c10b6105f45
parentf7a858bffcddaaf70c71b6b656e7cc21b6107cec
perf lock contention: Simplify parse_lock_type()

The get_type_flag() should check both str and name fields in the
lock_type_table so that it can find the appropriate flag without retrying
with ':R' or ':W' suffix from the caller.

Also fix a typo in the rt-mutex.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-lock.c