perf lock contention: Support old rw_semaphore type
authorNamhyung Kim <namhyung@kernel.org>
Tue, 7 Feb 2023 00:24:03 +0000 (16:24 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 8 Feb 2023 13:35:17 +0000 (10:35 -0300)
commit1bece1351c653c3d36bf761513e21ac8428449b4
treef56c4c851d5d777d6df2dba2cbae00f6dd7cbfce
parent3477f079fe70b3c97a619788d89ac357e207f302
perf lock contention: Support old rw_semaphore type

The old kernel has a different type of the owner field in rwsem.  We can
check it using bpf_core_type_matches() builtin in clang but it also
needs its own version check since it's available on recent versions.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230207002403.63590-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/bpf_skel/lock_contention.bpf.c