From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: [PATCH 2/4] perf annotate-data: Fix global variable lookup
Date: Fri, 5 Apr 2024 14:17:58 -0700 [thread overview]
Message-ID: <20240405211800.1412920-3-namhyung@kernel.org> (raw)
In-Reply-To: <20240405211800.1412920-1-namhyung@kernel.org>
The recent change in the global variable handling added a bug to miss
setting the return value even if it found a data type. Also add the
type name in the debug message.
Fixes: 1ebb5e17ef21 ("perf annotate-data: Add get_global_var_type()")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/annotate-data.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c
index 043d80791bd0..1047ea9d578c 100644
--- a/tools/perf/util/annotate-data.c
+++ b/tools/perf/util/annotate-data.c
@@ -1468,8 +1468,10 @@ static int find_data_type_die(struct data_loc_info *dloc, Dwarf_Die *type_die)
&offset, type_die)) {
dloc->type_offset = offset;
- pr_debug_dtp("found PC-rel by addr=%#"PRIx64" offset=%#x\n",
+ pr_debug_dtp("found PC-rel by addr=%#"PRIx64" offset=%#x",
dloc->var_addr, offset);
+ pr_debug_type_name(type_die, TSR_KIND_TYPE);
+ ret = 0;
goto out;
}
}
--
2.44.0.478.gd926399ef9-goog
next prev parent reply other threads:[~2024-04-05 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 21:17 [PATCH 0/4] perf annotate-data: small random fixes and updates Namhyung Kim
2024-04-05 21:17 ` [PATCH 1/4] perf annotate: Make sure to call symbol__annotate2() in TUI Namhyung Kim
2024-04-05 21:17 ` Namhyung Kim [this message]
2024-04-05 21:17 ` [PATCH 3/4] perf annotate-data: Do not delete non-asm lines Namhyung Kim
2024-04-05 21:18 ` [PATCH 4/4] perf annotate: Get rid of symbol__ensure_annotate() Namhyung Kim
2024-04-06 0:02 ` [PATCH 0/4] perf annotate-data: small random fixes and updates Ian Rogers
2024-04-08 14:15 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240405211800.1412920-3-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).