Skip to contentSkip to conversation

perf probe: fix ARM 32 building error.

PATCH In review Wang Nan 3 participants 3 messages Apr 8, 2015 perf events

lore
Share & tools
lore

Wang Nan

author
#0 lore raw

PATCH 1/1 perf probe: fix ARM 32 building error.

Commit 9b118acae310f57baee770b5db402500d8695e50 ("perf probe: Fix to handle aliased symbols in glibc") uses an absolute format '%lx' to print u64 argument, which causes compiling error on ARM 32.

This patch replaces it with PRIx64.

---
 tools/perf/util/probe-event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/probe-event.c +2 -1
index 8feac07..3dacec9 100644
@@ -320,7 +320,8 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
 		ret = -ENOENT;
 		goto out;
 	}
-	pr_debug("Symbol %s address found : %lx\n", pp->function, address);
+	pr_debug("Symbol %s address found : %" PRIx64 "\n",
+			pp->function, address);
 
 	ret = debuginfo__find_probe_point(dinfo, (unsigned long)address,
 					  result);
Signature · 1 line
1.8.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Wang Nan

Commit 9b118acae310f57baee770b5db402500d8695e50 ("perf probe: Fix to handle aliased symbols in glibc") uses an absolute format '%lx' to print u64 argument, which causes compiling error on ARM 32.

This patch replaces it with PRIx64.

Good catch! :)

Thanks!

Quoted 21 lines
---
 tools/perf/util/probe-event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/probe-event.c +2 -1
index 8feac07..3dacec9 100644
@@ -320,7 +320,8 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
 		ret = -ENOENT;
 		goto out;
 	}
-	pr_debug("Symbol %s address found : %lx\n", pp->function, address);
+	pr_debug("Symbol %s address found : %" PRIx64 "\n",
+			pp->function, address);
 
 	ret = debuginfo__find_probe_point(dinfo, (unsigned long)address,
 					  result);
Signature · 5 lines
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: [email protected]
#2 lore raw

[tip:perf/core] perf probe: Fix ARM 32 building error

In reply to Wang Nan
perf probe: Fix ARM 32 building error
Commit-ID:  f6c15621f04b97ce882c66e5055f0ac325fb8eb8
Gitweb:     http://git.kernel.org/tip/f6c15621f04b97ce882c66e5055f0ac325fb8eb8
Author:     Wang Nan <[email protected]>
AuthorDate: Wed, 8 Apr 2015 02:14:34 +0000
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 8 Apr 2015 10:49:48 -0300

perf probe: Fix ARM 32 building error

Commit 9b118acae310f57baee770b5db402500d8695e50 ("perf probe: Fix to handle aliased symbols in glibc") uses an absolute format '%lx' to print u64 argument, which causes compiling error on ARM 32.

This patch replaces it with PRIx64.

---
 tools/perf/util/probe-event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/probe-event.c +2 -1
index 4fd49f0..b788517 100644
@@ -322,7 +322,8 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
 		ret = -ENOENT;
 		goto out;
 	}
-	pr_debug("Symbol %s address found : %lx\n", pp->function, address);
+	pr_debug("Symbol %s address found : %" PRIx64 "\n",
+			pp->function, address);
 
 	ret = debuginfo__find_probe_point(dinfo, (unsigned long)address,
 					  result);