diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2014-02-03 16:31:32 +0200 |
---|---|---|
committer | Aliaksey Kandratsenka <alk@tut.by> | 2014-02-16 20:15:00 -0800 |
commit | d31f522f0e1b0e87ee3d5941e331ba745a0f5c23 (patch) | |
tree | dd25e0c5291d9d9857657bf691f6832e58617254 | |
parent | 15b5e7a35c83ce5d38fa523f2c291a2ac30bb8ed (diff) | |
download | gperftools-d31f522f0e1b0e87ee3d5941e331ba745a0f5c23.tar.gz |
Add aarch64 defines
With atomic operations and system call support in place, enable
with __aarch64__ defines Aarch64 support in other files around
the google-perftools header files. After these, google-perftools
testsuite (make check) results:
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
While it indicates that there is still work to do, This is still
better than the result I get on ARMv7:
12 of 46 tests failed.
-rw-r--r-- | src/base/basictypes.h | 3 | ||||
-rw-r--r-- | src/base/cycleclock.h | 6 | ||||
-rw-r--r-- | src/base/linuxthreads.h | 2 | ||||
-rwxr-xr-x | src/malloc_hook_mmap_linux.h | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/base/basictypes.h b/src/base/basictypes.h index 677c3cd..2862c11 100644 --- a/src/base/basictypes.h +++ b/src/base/basictypes.h @@ -348,6 +348,9 @@ class AssignAttributeStartEnd { // some ARMs have shorter cache lines (ARM1176JZF-S is 32 bytes for example) but obviously 64-byte aligned implies 32-byte aligned # elif (defined(__mips__)) # define CACHELINE_ALIGNED __attribute__((aligned(128))) +# elif (defined(__aarch64__)) +# define CACHELINE_ALIGNED __attribute__((aligned(64))) + // implementation specific, Cortex-A53 and 57 should have 64 bytes # else # error Could not determine cache line length - unknown architecture # endif diff --git a/src/base/cycleclock.h b/src/base/cycleclock.h index d6a6662..dc2d569 100644 --- a/src/base/cycleclock.h +++ b/src/base/cycleclock.h @@ -50,7 +50,7 @@ #include "base/arm_instruction_set_select.h" // base/sysinfo.h is really big and we don't want to include it unless // it is necessary. -#if defined(__arm__) || defined(__mips__) +#if defined(__arm__) || defined(__mips__) || defined(__aarch64__) # include "base/sysinfo.h" #endif #if defined(__MACH__) && defined(__APPLE__) @@ -67,7 +67,7 @@ extern "C" uint64 __rdtsc(); #pragma intrinsic(__rdtsc) #endif -#if defined(ARMV3) || defined(__mips__) +#if defined(ARMV3) || defined(__mips__) || defined(__aarch64__) #include <sys/time.h> #endif @@ -133,7 +133,7 @@ struct CycleClock { _asm rdtsc #elif defined(_MSC_VER) return __rdtsc(); -#elif defined(ARMV3) +#elif defined(ARMV3) || defined(__aarch64__) #if defined(ARMV7) // V7 is the earliest arch that has a standard cyclecount uint32 pmccntr; uint32 pmuseren; diff --git a/src/base/linuxthreads.h b/src/base/linuxthreads.h index 5c318fe..16bc8c6 100644 --- a/src/base/linuxthreads.h +++ b/src/base/linuxthreads.h @@ -41,7 +41,7 @@ * related platforms should not be difficult. */ #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ - defined(__mips__) || defined(__PPC__)) && defined(__linux) + defined(__mips__) || defined(__PPC__) || defined(__aarch64__)) && defined(__linux) /* Define the THREADS symbol to make sure that there is exactly one core dumper * built into the library. diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h index 54e5d87..8e5a3b0 100755 --- a/src/malloc_hook_mmap_linux.h +++ b/src/malloc_hook_mmap_linux.h @@ -52,7 +52,7 @@ // I test for 64-bit first so I don't have to do things like // '#if (defined(__mips__) && !defined(__MIPS64__))' as a mips32 check. -#if defined(__x86_64__) || defined(__PPC64__) || (defined(_MIPS_SIM) && _MIPS_SIM == _ABI64) +#if defined(__x86_64__) || defined(__PPC64__) || defined(__aarch64__) || (defined(_MIPS_SIM) && _MIPS_SIM == _ABI64) static inline void* do_mmap64(void *start, size_t length, int prot, int flags, |