# HG changeset patch # User ysuenaga # Date 1430215479 -32400 # Node ID 2bb164446d6709d883a181b1b199787025fccab8 # Parent 79e3c82e17aaddb39fc6d902416eb2068ce04b3d 8076212: AllocateHeap() and ReallocateHeap() should be inlined. Summary: NMT with detail option reports incorrect caller address on Linux. Reviewed-by: dholmes, coleenp diff -r 79e3c82e17aa -r 2bb164446d67 hotspot/src/share/vm/memory/allocation.inline.hpp --- a/hotspot/src/share/vm/memory/allocation.inline.hpp Tue Apr 28 03:27:10 2015 -0400 +++ b/hotspot/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);