ssett / gperftools

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

Patches to Support Aarch64 on aarch64 #603

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patches add Aarch64 support for google-perftools.

With these patches, the unit tests report:

    8 of 46 tests failed.

    FAIL: sampling_test.sh
    FAIL: heap-profiler_unittest.sh
    FAIL: heap-checker_unittest.sh
    FAIL: heap-checker-death_unittest.sh
    FAIL: sampling_debug_test.sh
    FAIL: heap-profiler_debug_unittest.sh
    FAIL: heap-checker_debug_unittest.sh
    FAIL: profiler_unittest.sh

This would seem to indicate that using tcmalloc using these patches is probably 
safe, but heap profiler and checker might not be ready yet. Any feedback is 
appreceated.

Patches are also in my git repository at:

http://git.linaro.org/people/riku.voipio/gperftools.git/shortlog/refs/heads/aarc
h64-port

and can be checked out by:

git clone http://git.linaro.org/git/people/riku.voipio/gperftools.git --branch 
aarch64-port

Original issue reported on code.google.com by riku.voi...@linaro.org on 5 Feb 2014 at 3:36

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good. But I think you'll need to keep getdents syscall. It looks like 
PPC64 doesn't have it.

Also for linux_syscall_support.h consider also posting your patch to 
https://code.google.com/p/linux-syscall-support/ maintained by chromium folks.

Original comment by alkondratenko on 8 Feb 2014 at 10:02

GoogleCodeExporter commented 9 years ago
Correction. It looks like PPC64 does not have getdents64 but does have getdents.

Original comment by alkondratenko on 8 Feb 2014 at 10:06

GoogleCodeExporter commented 9 years ago
Ok, Attached updated patch #2 to keep getdents. unfortunately it makes the code 
more complicated as getdents and getdents64 have different kernel structure...

Original comment by riku.voi...@linaro.org on 10 Feb 2014 at 9:57

Attachments:

GoogleCodeExporter commented 9 years ago
Hi this patch looks for PPC64. Although I'm still seeing failing tests, it is 
the same one before and after the patch.

Original comment by zatr...@gmail.com on 10 Feb 2014 at 4:00

GoogleCodeExporter commented 9 years ago
zatrazz, can you please elaborate on those test failures ?

Original comment by alkondratenko on 10 Feb 2014 at 6:22

GoogleCodeExporter commented 9 years ago
Rebased here: 
https://github.com/alk/gperftools/commits/wip-aarch64-port-from-riku-voipio

Was going to merge, but then found comment indicating that clone is taken from 
glibc. That appears to be a problem given that original tcmalloc authors choose 
bsd-style license and glibc is GPL.

Maybe you can reach authors of clone.S for aarch64 and have them post their 
"ack" on relicensing this code ?

Original comment by alkondratenko on 17 Feb 2014 at 4:23

GoogleCodeExporter commented 9 years ago
perhaps yet another alternative is to just make mips port have gpl license. If 
such trick is at all possible.

Original comment by alkondratenko on 17 Feb 2014 at 4:35

GoogleCodeExporter commented 9 years ago
Hi,

I saw the same comment was already in PPC code of linux_syscall_support.h:

  #elif defined (__PPC__)
...
 /* clone function adapted from glibc 2.18 clone.S                       */

So assumed this was already acceptable. 

Original comment by riku.voi...@linaro.org on 17 Feb 2014 at 9:12

GoogleCodeExporter commented 9 years ago
Merged. Thanks a lot.

Original comment by alkondratenko on 22 Feb 2014 at 7:50