lkml.org 
[lkml]   [2024]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] perf annotate-data: Fix global variable lookup
Date
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

\
 
 \ /
  Last update: 2024-05-27 16:26    [W:0.041 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site