perf dso: Add dso__filename_with_chroot() to reduce number of accesses to dso->nsinfo...
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Apr 2023 21:28:01 +0000 (18:28 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 Apr 2023 21:47:55 +0000 (18:47 -0300)
commit7031edac9dbc0f880c9fbaa40ca08b5de34239c6
tree41c376c2a746d69ac2fa143d35bc95c3163ef8e2
parentda885a0e5e0610e011f14a70c2dc7c4ddf79c6d6
perf dso: Add dso__filename_with_chroot() to reduce number of accesses to dso->nsinfo members

We'll need to reference count dso->nsinfo, so reduce the number of
direct accesses by having a shorter form of obtaining a filename with
a chroot (namespace one).

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Link: https://lore.kernel.org/lkml/ZD26ZlqSbgSyH5lX@kernel.org
[ Used nsinfo__pid(dso->nsinfo), as it was already present ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c
tools/perf/util/annotate.c
tools/perf/util/dso.c
tools/perf/util/dso.h
tools/perf/util/dsos.c
tools/perf/util/symbol.c