Skip to contentSkip to conversation

perf tools: Fix dwarf-aux.c compilation on i386

PATCH In review Jiri Olsa 4 participants 6 messages May 15, 2015 – May 20, 2015 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Fix dwarf-aux.c compilation on i386

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.

---
 tools/perf/util/dwarf-aux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/util/dwarf-aux.c +4 -4
index eb47abdcf0ac..57f3ef41c2bc 100644
@@ -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);
 		}
 	}
Signature · 1 line
1.9.3
#1 lore raw

Em Fri, May 15, 2015 at 06:23:11PM +0200, Jiri Olsa escreveu:

Quoted 3 lines

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.

Jiri,

Please try to always indicate against which branch your patches
should be applied, be it as [PATCH perf/core], [PATCH perf/urgent] for isolated patches, or on the cover letter [GIT PULL 0/N perf/core], or as I do with Ingo, "[GIT PULL] perf/core fixes".

I thought, for this one, hey, its a fix, should go soon to Ingo!
Tried to apply to perf/urgent, and it didn't apply :-\

Applying to perf/core instead now.

Thanks,

- Arnaldo

#2 lore raw
Quoted 12 lines · Arnaldo Carvalho de Melo

Em Fri, May 15, 2015 at 06:23:11PM +0200, Jiri Olsa escreveu:

Quoted 3 lines

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.

Jiri,

Please try to always indicate against which branch your patches
should be applied, be it as [PATCH perf/core], [PATCH perf/urgent] for isolated patches, or on the cover letter [GIT PULL 0/N perf/core], or as I do with Ingo, "[GIT PULL] perf/core fixes".

Quoted 4 lines

I thought, for this one, hey, its a fix, should go soon to Ingo!
Tried to apply to perf/urgent, and it didn't apply :-\

Applying to perf/core instead now.

hum, I've never rebased against perf/urgent, I'll try to squeeze it in next time ;-)

jirka

#3 lore raw

Em Sat, May 16, 2015 at 08:21:49AM +0200, Jiri Olsa escreveu:

Quoted 11 lines · Arnaldo Carvalho de Melo
Quoted 9 lines

Em Fri, May 15, 2015 at 06:23:11PM +0200, Jiri Olsa escreveu:

Quoted 3 lines

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.

Please try to always indicate against which branch your patches
should be applied, be it as [PATCH perf/core], [PATCH perf/urgent] for isolated patches, or on the cover letter [GIT PULL 0/N perf/core], or as I do with Ingo, "[GIT PULL] perf/core fixes".

Quoted 7 lines
Quoted 4 lines

I thought, for this one, hey, its a fix, should go soon to Ingo!
Tried to apply to perf/urgent, and it didn't apply :-\

Applying to perf/core instead now.

hum, I've never rebased against perf/urgent, I'll try to squeeze it in next time ;-)

In general, if it is a fix, try to check if it should be applied to perf/urgent first, if that is not the case, then it is fixing a bug introduced in perf/core, where it should go.

If you don't make it clear where to apply, then the burden is on me to check, if I have to do it for everybody... it doesn't scale :-)

- Arnaldo

#4 lore raw
Quoted 20 lines · Arnaldo Carvalho de Melo

Em Sat, May 16, 2015 at 08:21:49AM +0200, Jiri Olsa escreveu:

Quoted 11 lines · Arnaldo Carvalho de Melo
Quoted 9 lines

Em Fri, May 15, 2015 at 06:23:11PM +0200, Jiri Olsa escreveu:

Quoted 3 lines

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.

Please try to always indicate against which branch your patches
should be applied, be it as [PATCH perf/core], [PATCH perf/urgent] for isolated patches, or on the cover letter [GIT PULL 0/N perf/core], or as I do with Ingo, "[GIT PULL] perf/core fixes".

Quoted 7 lines
Quoted 4 lines

I thought, for this one, hey, its a fix, should go soon to Ingo!
Tried to apply to perf/urgent, and it didn't apply :-\

Applying to perf/core instead now.

hum, I've never rebased against perf/urgent, I'll try to squeeze it in next time ;-)

Quoted 6 lines

In general, if it is a fix, try to check if it should be applied to perf/urgent first, if that is not the case, then it is fixing a bug introduced in perf/core, where it should go.

If you don't make it clear where to apply, then the burden is on me to check, if I have to do it for everybody... it doesn't scale :-)

ok, will try to do it next time

thanks,
jirka

#5 lore raw
In reply to Jiri Olsa
perf tools: Fix dwarf-aux.c compilation on i386
Commit-ID:  c1b9034db7c85428f96db4ecf77abbf02d96de71
Gitweb:     http://git.kernel.org/tip/c1b9034db7c85428f96db4ecf77abbf02d96de71
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 15 May 2015 18:23:11 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 May 2015 16:59:43 -0300

perf tools: Fix dwarf-aux.c compilation on i386

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.

---
 tools/perf/util/dwarf-aux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/util/dwarf-aux.c +4 -4
index eb47abd..57f3ef4 100644
@@ -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);
 		}
 	}