perf tools: Fix dwarf-aux.c compilation on i386
authorJiri Olsa <[email protected]>
Fri, 15 May 2015 16:23:11 +0000 (18:23 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 15 May 2015 19:59:43 +0000 (16:59 -0300)
Replacing %lu format strings for Dwarf_Addr type with PRIu64 as it fits
for Dwarf_Addr (defined as uint64_t) type and works also on both 32/64
bits.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: He Kuang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/dwarf-aux.c

index eb47abdcf0acd81fca49155c37e4a7435885e3cc..57f3ef41c2bc3e6261c03f54dc7f99791a003108 100644 (file)
@@ -994,11 +994,11 @@ static int die_get_var_innermost_scope(Dwarf_Die *sp_die, Dwarf_Die *vr_die,
                end -= entry;
 
                if (first) {
-                       strbuf_addf(buf, "@<%s+[%lu-%lu",
+                       strbuf_addf(buf, "@<%s+[%" PRIu64 "-%" PRIu64,
                                name, start, end);
                        first = false;
                } else {
-                       strbuf_addf(buf, ",%lu-%lu",
+                       strbuf_addf(buf, ",%" PRIu64 "-%" PRIu64,
                                start, end);
                }
        }
@@ -1057,11 +1057,11 @@ int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf)
                start -= entry;
                end -= entry;
                if (first) {
-                       strbuf_addf(buf, "@<%s+[%lu-%lu",
+                       strbuf_addf(buf, "@<%s+[%" PRIu64 "-%" PRIu64,
                                name, start, end);
                        first = false;
                } else {
-                       strbuf_addf(buf, ",%lu-%lu",
+                       strbuf_addf(buf, ",%" PRIu64 "-%" PRIu64,
                                start, end);
                }
        }