< prev index next >

src/share/vm/utilities/stack.inline.hpp

Print this page
rev 10456 : 8151593: Cleanup definition/usage of INLINE/NOINLINE macros and add xlC support
Contributed-by: matthias.baesken@sap.com

*** 1,7 **** /* ! * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 25,45 **** #ifndef SHARE_VM_UTILITIES_STACK_INLINE_HPP #define SHARE_VM_UTILITIES_STACK_INLINE_HPP #include "utilities/stack.hpp" - // Stack is used by the GC code and in some hot paths a lot of the Stack - // code gets inlined. This is generally good, but when too much code has - // been inlined, no further inlining is allowed by GCC. Therefore we need - // to prevent parts of the slow path in Stack to be inlined to allow other - // code to be. - #if defined(TARGET_COMPILER_gcc) - #define NOINLINE __attribute__((noinline)) - #else - #define NOINLINE - #endif - template <MEMFLAGS F> StackBase<F>::StackBase(size_t segment_size, size_t max_cache_size, size_t max_size): _seg_size(segment_size), _max_cache_size(max_cache_size), _max_size(adjust_max_size(max_size, segment_size)) --- 25,34 ----
*** 149,158 **** --- 138,152 ---- void Stack<E, F>::free(E* addr, size_t bytes) { FREE_C_HEAP_ARRAY(char, (char*) addr); } + // Stack is used by the GC code and in some hot paths a lot of the Stack + // code gets inlined. This is generally good, but when too much code has + // been inlined, no further inlining is allowed by GCC. Therefore we need + // to prevent parts of the slow path in Stack to be inlined to allow other + // code to be. template <class E, MEMFLAGS F> NOINLINE void Stack<E, F>::push_segment() { assert(this->_cur_seg_size == this->_seg_size, "current segment is not full"); E* next;
*** 278,285 **** return addr; } return _cur_seg + --_cur_seg_size; } - #undef NOINLINE - #endif // SHARE_VM_UTILITIES_STACK_INLINE_HPP --- 272,277 ----
< prev index next >