src/share/vm/runtime/vm_operations.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 "classfile/symbolTable.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "compiler/compileBroker.hpp"
  30 #include "compiler/compilerOracle.hpp"
  31 #include "gc_implementation/shared/isGCActiveMark.hpp"

  32 #include "memory/resourceArea.hpp"
  33 #include "oops/symbol.hpp"
  34 #include "runtime/arguments.hpp"
  35 #include "runtime/deoptimization.hpp"
  36 #include "runtime/interfaceSupport.hpp"
  37 #include "runtime/sweeper.hpp"
  38 #include "runtime/thread.inline.hpp"
  39 #include "runtime/vm_operations.hpp"
  40 #include "services/threadService.hpp"
  41 #include "trace/tracing.hpp"
  42 
  43 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  44 
  45 #define VM_OP_NAME_INITIALIZE(name) #name,
  46 
  47 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  48   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  49 
  50 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  51   _calling_thread = thread;


 468   if (_vm_exited &&
 469       ThreadLocalStorage::get_thread_slow() != _shutdown_thread) {
 470     // _vm_exited is set at safepoint, and the Threads_lock is never released
 471     // we will block here until the process dies
 472     Threads_lock->lock_without_safepoint_check();
 473     ShouldNotReachHere();
 474   }
 475 }
 476 
 477 void VM_PrintCompileQueue::doit() {
 478   CompileBroker::print_compile_queues(_out);
 479 }
 480 
 481 void VM_PrintCodeList::doit() {
 482   CodeCache::print_codelist(_out);
 483 }
 484 
 485 void VM_PrintCodeCache::doit() {
 486   CodeCache::print_layout(_out);
 487 }






   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 "classfile/symbolTable.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "compiler/compileBroker.hpp"
  30 #include "compiler/compilerOracle.hpp"
  31 #include "gc_implementation/shared/isGCActiveMark.hpp"
  32 #include "memory/heapInspection.hpp"
  33 #include "memory/resourceArea.hpp"
  34 #include "oops/symbol.hpp"
  35 #include "runtime/arguments.hpp"
  36 #include "runtime/deoptimization.hpp"
  37 #include "runtime/interfaceSupport.hpp"
  38 #include "runtime/sweeper.hpp"
  39 #include "runtime/thread.inline.hpp"
  40 #include "runtime/vm_operations.hpp"
  41 #include "services/threadService.hpp"
  42 #include "trace/tracing.hpp"
  43 
  44 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  45 
  46 #define VM_OP_NAME_INITIALIZE(name) #name,
  47 
  48 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  49   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  50 
  51 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  52   _calling_thread = thread;


 469   if (_vm_exited &&
 470       ThreadLocalStorage::get_thread_slow() != _shutdown_thread) {
 471     // _vm_exited is set at safepoint, and the Threads_lock is never released
 472     // we will block here until the process dies
 473     Threads_lock->lock_without_safepoint_check();
 474     ShouldNotReachHere();
 475   }
 476 }
 477 
 478 void VM_PrintCompileQueue::doit() {
 479   CompileBroker::print_compile_queues(_out);
 480 }
 481 
 482 void VM_PrintCodeList::doit() {
 483   CodeCache::print_codelist(_out);
 484 }
 485 
 486 void VM_PrintCodeCache::doit() {
 487   CodeCache::print_layout(_out);
 488 }
 489 
 490 #if INCLUDE_SERVICES
 491 void VM_PrintClassHierachry::doit() {
 492   KlassHierarchy::print_class_hierarchy(_out);
 493 }
 494 #endif