[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZiptiObJxYPeXqK_@x1>
Date: Thu, 25 Apr 2024 11:49:44 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 2/2] perf annotate: Update dso binary type when try
build-id
On Thu, Apr 25, 2024 at 11:12:40AM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Apr 24, 2024 at 05:51:57PM -0700, Namhyung Kim wrote:
> > +++ b/tools/perf/util/disasm.c
> > @@ -1156,6 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
> > mutex_unlock(&dso->lock);
> > + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) {
> > + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE;
> > }
> Fixed up to take into account a recent patch by Ian that turned that
> &dso->lock into dso__lock(dso):
> +++ b/tools/perf/util/disasm.c
> @@ -1156,6 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
> }
> }
> mutex_unlock(dso__lock(dso));
> + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) {
> + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE;
> }
Nah, I forgot some more stuff, this is what I have now:
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index 2921b32357705a02..72aec8f61b944a7a 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -1156,8 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
}
}
mutex_unlock(dso__lock(dso));
- } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) {
- dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE;
+ } else if (dso__binary_type(dso) == DSO_BINARY_TYPE__NOT_FOUND) {
+ dso__set_binary_type(dso, DSO_BINARY_TYPE__BUILD_ID_CACHE);
}
free(build_id_path);
Powered by blists - more mailing lists