Mercurial > hg > graal-jvmci-8
changeset 23002:ed0067c67bd7
8076212: AllocateHeap() and ReallocateHeap() should be inlined.
Summary: NMT with detail option reports incorrect caller address on Linux.
Reviewed-by: dholmes, coleenp
author | ysuenaga |
---|---|
date | Tue, 28 Apr 2015 19:04:39 +0900 |
parents | 7a4abf4cbade |
children | 0f0188a02ecb |
files | src/share/vm/memory/allocation.inline.hpp |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/memory/allocation.inline.hpp Tue Feb 18 09:54:24 2014 -0500 +++ b/src/share/vm/memory/allocation.inline.hpp Tue Apr 28 19:04:39 2015 +0900 @@ -62,11 +62,18 @@ } return p; } + +#ifdef __GNUC__ +__attribute__((always_inline)) +#endif inline char* AllocateHeap(size_t size, MEMFLAGS flags, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { return AllocateHeap(size, flags, CURRENT_PC, alloc_failmode); } +#ifdef __GNUC__ +__attribute__((always_inline)) +#endif inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flag, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) { char* p = (char*) os::realloc(old, size, flag, CURRENT_PC);