Sgenmi / gperftools

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

[PATCH] Fix syscall wrapper for PowerPC #553

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The patch below contains some cleanups and fixes for the Linux syscall
wrappers for PowerPC. This patches some heap-checker* test for PPC32 and
PPC64.

* src/stacktrace_powerpc-inl.h: It is just a cleanup for the stacktrace
  functions for PowerPC. The idea is to simplify the code.
* src/tests/heap-checker_unittest.cc: Handles the PPC64 function descriptor
  correctly in malloc tracers. Different from other architecture, for PPC64 
  the address returned in function pointers are the ODP entry, not the
  symbol address in .text segment. This leads the comparison bogus, since
  it will compare a ODP entry with a .text address.
* src/heap-checker.cc: Add support for PPC in ptrace.
* src/base/elfcore.h: Likewise.
* src/base/linuxthreads.cc: Fix the thread creation using the clone wrapper.
* src/base/linux_syscall_support.h: Various fixes for PPC32 and PPC64:
  fixes the kernel_stat[64] struct layout, and sys_clone and sys_socket
  implementation.

Tested on PPC32 and PPC64 and no regressions found.

Original issue reported on code.google.com by zatr...@gmail.com on 21 Jul 2013 at 6:37

Attachments:

GoogleCodeExporter commented 9 years ago
thanks. Merged

Original comment by alkondratenko on 26 Jul 2013 at 6:04