aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/srcline.c12
-rw-r--r--tools/perf/util/util.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index e73b6a5c9e0f..c93fb0c5bd0b 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -20,7 +20,7 @@
20 20
21struct a2l_data { 21struct a2l_data {
22 const char *input; 22 const char *input;
23 unsigned long addr; 23 u64 addr;
24 24
25 bool found; 25 bool found;
26 const char *filename; 26 const char *filename;
@@ -147,7 +147,7 @@ static void addr2line_cleanup(struct a2l_data *a2l)
147 free(a2l); 147 free(a2l);
148} 148}
149 149
150static int addr2line(const char *dso_name, unsigned long addr, 150static int addr2line(const char *dso_name, u64 addr,
151 char **file, unsigned int *line, struct dso *dso) 151 char **file, unsigned int *line, struct dso *dso)
152{ 152{
153 int ret = 0; 153 int ret = 0;
@@ -193,7 +193,7 @@ void dso__free_a2l(struct dso *dso)
193 193
194#else /* HAVE_LIBBFD_SUPPORT */ 194#else /* HAVE_LIBBFD_SUPPORT */
195 195
196static int addr2line(const char *dso_name, unsigned long addr, 196static int addr2line(const char *dso_name, u64 addr,
197 char **file, unsigned int *line_nr, 197 char **file, unsigned int *line_nr,
198 struct dso *dso __maybe_unused) 198 struct dso *dso __maybe_unused)
199{ 199{
@@ -252,7 +252,7 @@ void dso__free_a2l(struct dso *dso __maybe_unused)
252 */ 252 */
253#define A2L_FAIL_LIMIT 123 253#define A2L_FAIL_LIMIT 123
254 254
255char *get_srcline(struct dso *dso, unsigned long addr, struct symbol *sym, 255char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
256 bool show_sym) 256 bool show_sym)
257{ 257{
258 char *file = NULL; 258 char *file = NULL;
@@ -293,10 +293,10 @@ out:
293 dso__free_a2l(dso); 293 dso__free_a2l(dso);
294 } 294 }
295 if (sym) { 295 if (sym) {
296 if (asprintf(&srcline, "%s+%ld", show_sym ? sym->name : "", 296 if (asprintf(&srcline, "%s+%" PRIu64, show_sym ? sym->name : "",
297 addr - sym->start) < 0) 297 addr - sym->start) < 0)
298 return SRCLINE_UNKNOWN; 298 return SRCLINE_UNKNOWN;
299 } else if (asprintf(&srcline, "%s[%lx]", dso->short_name, addr) < 0) 299 } else if (asprintf(&srcline, "%s[%" PRIx64 "]", dso->short_name, addr) < 0)
300 return SRCLINE_UNKNOWN; 300 return SRCLINE_UNKNOWN;
301 return srcline; 301 return srcline;
302} 302}
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index be198ac27031..027a5153495c 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -310,7 +310,7 @@ static inline int path__join3(char *bf, size_t size,
310struct dso; 310struct dso;
311struct symbol; 311struct symbol;
312 312
313char *get_srcline(struct dso *dso, unsigned long addr, struct symbol *sym, 313char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym,
314 bool show_sym); 314 bool show_sym);
315void free_srcline(char *srcline); 315void free_srcline(char *srcline);
316 316