3152N/A * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Safepoint synchronization 0N/A// The VMThread or CMS_thread uses the SafepointSynchronize::begin/end 0N/A// methods to enter/exit a safepoint region. The begin method will roll 0N/A// all JavaThreads forward to a safepoint. 0N/A// JavaThreads must use the ThreadSafepointState abstraction (defined in 0N/A// exit points *must* be at a safepoint. 0N/A// Implements roll-forward to safepoint (safepoint synchronization) 0N/A // Keep this value 0. See the coment in do_call_back() 0N/A _synchronized =
2 // All Java threads are stopped at a safepoint. Only VM thread is running 0N/A // This counter is used for fast versions of jni_Get<Primitive>Field. 0N/A // An even value means there is no ongoing safepoint operations. 0N/A // The counter is incremented ONLY at the beginning and end of each 0N/A // safepoint. The fact that Threads_lock is held throughout each pair of 0N/A // increments (at the beginning and end of each safepoint) guarantees 0N/A // For debug long safepoint 0N/A // Main entry points 0N/A // Roll all threads forward to safepoint. Must be called by the 0N/A // VMThread or CMS_thread. 0N/A static void end();
// Start all suspended threads again... 0N/A // Called when a thread volantary blocks 0N/A // Exception handling for page polling 0N/A // VM Thread interface for determining safepoint rate 0N/A// State class for a thread suspended at a safepoint 0N/A // These states are maintained by VM thread while threads are being brought 0N/A // to a safepoint. After SafepointSynchronize::end(), they are reset to 0N/A _running = 0,
// Thread state not yet determined (i.e., not at a safepoint yet) 0N/A _call_back =
2 // Keep executing and wait for callback (if thread is in interpreted or vm) 0N/A // Thread has called back the safepoint code (for debugging) 0N/A // Support for safepoint timeout (debugging) 1879N/A#
endif // SHARE_VM_RUNTIME_SAFEPOINT_HPP