< prev index next >

src/hotspot/share/gc/shared/concurrentGCPhaseManager.cpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/concurrentGCPhaseManager.hpp"
  27 #include "runtime/mutexLocker.hpp"
  28 #include "runtime/thread.hpp"
  29 
  30 #define assert_ConcurrentGC_thread() \
  31   assert(Thread::current()->is_ConcurrentGC_thread(), "precondition")
  32 
  33 #define assert_not_enter_unconstrained(phase) \
  34   assert((phase) != UNCONSTRAINED_PHASE, "Cannot enter \"unconstrained\" phase")
  35 
  36 #define assert_manager_is_tos(manager, stack, kind)  \
  37   assert((manager) == (stack)->_top, kind " manager is not top of stack")
  38 
  39 ConcurrentGCPhaseManager::Stack::Stack() :
  40   _requested_phase(UNCONSTRAINED_PHASE),
  41   _top(NULL)
  42 { }
  43 
  44 ConcurrentGCPhaseManager::ConcurrentGCPhaseManager(int phase, Stack* stack) :
  45   _phase(phase),
  46   _active(true),
  47   _prev(NULL),




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/concurrentGCPhaseManager.hpp"
  27 #include "runtime/mutexLocker.inline.hpp"
  28 #include "runtime/thread.hpp"
  29 
  30 #define assert_ConcurrentGC_thread() \
  31   assert(Thread::current()->is_ConcurrentGC_thread(), "precondition")
  32 
  33 #define assert_not_enter_unconstrained(phase) \
  34   assert((phase) != UNCONSTRAINED_PHASE, "Cannot enter \"unconstrained\" phase")
  35 
  36 #define assert_manager_is_tos(manager, stack, kind)  \
  37   assert((manager) == (stack)->_top, kind " manager is not top of stack")
  38 
  39 ConcurrentGCPhaseManager::Stack::Stack() :
  40   _requested_phase(UNCONSTRAINED_PHASE),
  41   _top(NULL)
  42 { }
  43 
  44 ConcurrentGCPhaseManager::ConcurrentGCPhaseManager(int phase, Stack* stack) :
  45   _phase(phase),
  46   _active(true),
  47   _prev(NULL),


< prev index next >