5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 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 "incls/_precompiled.incl" 26 # include "incls/_vmThread.cpp.incl" 27 28 HS_DTRACE_PROBE_DECL3(hotspot, vmops__request, char *, uintptr_t, int); 29 HS_DTRACE_PROBE_DECL3(hotspot, vmops__begin, char *, uintptr_t, int); 30 HS_DTRACE_PROBE_DECL3(hotspot, vmops__end, char *, uintptr_t, int); 31 32 // Dummy VM operation to act as first element in our circular double-linked list 33 class VM_Dummy: public VM_Operation { 34 VMOp_Type type() const { return VMOp_Dummy; } 35 void doit() {}; 36 }; 37 38 VMOperationQueue::VMOperationQueue() { 39 // The queue is a circular doubled-linked list, which always contains 40 // one element (i.e., one element means empty). 41 for(int i = 0; i < nof_priorities; i++) { 42 _queue_length[i] = 0; 43 _queue_counter = 0; 44 _queue[i] = new VM_Dummy(); 45 _queue[i]->set_next(_queue[i]); 46 _queue[i]->set_prev(_queue[i]); | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 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 "compiler/compileBroker.hpp" 27 #include "gc_interface/collectedHeap.hpp" 28 #include "memory/resourceArea.hpp" 29 #include "oops/methodOop.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/interfaceSupport.hpp" 32 #include "runtime/mutexLocker.hpp" 33 #include "runtime/os.hpp" 34 #include "runtime/vmThread.hpp" 35 #include "runtime/vm_operations.hpp" 36 #include "services/runtimeService.hpp" 37 #include "utilities/dtrace.hpp" 38 #include "utilities/events.hpp" 39 #include "utilities/xmlstream.hpp" 40 #ifdef TARGET_OS_FAMILY_linux 41 # include "thread_linux.inline.hpp" 42 #endif 43 #ifdef TARGET_OS_FAMILY_solaris 44 # include "thread_solaris.inline.hpp" 45 #endif 46 #ifdef TARGET_OS_FAMILY_windows 47 # include "thread_windows.inline.hpp" 48 #endif 49 50 HS_DTRACE_PROBE_DECL3(hotspot, vmops__request, char *, uintptr_t, int); 51 HS_DTRACE_PROBE_DECL3(hotspot, vmops__begin, char *, uintptr_t, int); 52 HS_DTRACE_PROBE_DECL3(hotspot, vmops__end, char *, uintptr_t, int); 53 54 // Dummy VM operation to act as first element in our circular double-linked list 55 class VM_Dummy: public VM_Operation { 56 VMOp_Type type() const { return VMOp_Dummy; } 57 void doit() {}; 58 }; 59 60 VMOperationQueue::VMOperationQueue() { 61 // The queue is a circular doubled-linked list, which always contains 62 // one element (i.e., one element means empty). 63 for(int i = 0; i < nof_priorities; i++) { 64 _queue_length[i] = 0; 65 _queue_counter = 0; 66 _queue[i] = new VM_Dummy(); 67 _queue[i]->set_next(_queue[i]); 68 _queue[i]->set_prev(_queue[i]); |