cynthia / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Compiling on ppc is not working proplery. #397

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compiling on PPC is not working properly. Because the mmap syscall is not 
properly defined.

Here is a patch to fix it.
--- google-perftools-1.9.1/src/base/linux_syscall_support.h 2011-11-16 
15:19:18.000000000 -0600
+++ google-perftools-1.9.1.patch/src/base/linux_syscall_support.h   2012-01-23 
07:05:47.943085363 -0600
@@ -2609,7 +2609,13 @@ struct kernel_statfs {
                          struct kernel_stat64 *, b)
     LSS_INLINE _syscall5(int, _llseek,     uint, fd, ulong, hi, ulong, lo,
                          loff_t *, res, uint, wh)
-    LSS_INLINE _syscall1(void*, mmap,              void*, a)
+    LSS_INLINE _syscall6(void*, mmap,
+                void*, start,
+            size_t, len,
+            int, prot,
+            int, flaqs,
+            int, fd,
+            off_t, offset);
 #ifndef __PPC64__
     LSS_INLINE _syscall6(void*, mmap2,             void*, s,
                          size_t,                   l, int,               p,

Signed-off-by: Breno Leitao <brenohl@br.ibm.com>

Original issue reported on code.google.com by breno.le...@gmail.com on 23 Jan 2012 at 1:10

GoogleCodeExporter commented 9 years ago
Wow, this code dates back to 2007!  Has nobody tried to use perftools on PPC 
before this?  Or maybe PPC64 works ok, but not PPC32.

In any case, I'll ask the original author of this code to review, and assuming 
it looks ok, get it into the next release.

Original comment by csilv...@gmail.com on 26 Jan 2012 at 1:22

GoogleCodeExporter commented 9 years ago
I've made many changes to linux_syscall_support.h for this release, including 
this one.  So this should be fixed in perftools 1.10, just released.  However, 
I don't have a PPC box to test on, so who knows... let me know if you still 
have problems!

Original comment by csilv...@gmail.com on 31 Jan 2012 at 7:19