< prev index next >

src/hotspot/share/runtime/vmOperations.cpp

Print this page
rev 57601 : [mq]: metaspace-improvement


  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 "gc/shared/collectedHeap.hpp"
  31 #include "gc/shared/isGCActiveMark.hpp"
  32 #include "logging/log.hpp"
  33 #include "logging/logStream.hpp"
  34 #include "logging/logConfiguration.hpp"
  35 #include "memory/heapInspection.hpp"

  36 #include "memory/resourceArea.hpp"
  37 #include "memory/universe.hpp"
  38 #include "oops/symbol.hpp"
  39 #include "runtime/arguments.hpp"
  40 #include "runtime/deoptimization.hpp"
  41 #include "runtime/frame.inline.hpp"
  42 #include "runtime/interfaceSupport.inline.hpp"
  43 #include "runtime/sweeper.hpp"
  44 #include "runtime/thread.inline.hpp"
  45 #include "runtime/threadSMR.inline.hpp"
  46 #include "runtime/vmOperations.hpp"
  47 #include "services/threadService.hpp"
  48 
  49 #define VM_OP_NAME_INITIALIZE(name) #name,
  50 
  51 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  52   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  53 
  54 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  55   _calling_thread = thread;


 207   }
 208   return true;
 209 }
 210 
 211 void VM_PrintThreads::doit() {
 212   Threads::print_on(_out, true, false, _print_concurrent_locks, _print_extended_info);
 213 }
 214 
 215 void VM_PrintThreads::doit_epilogue() {
 216   if (_print_concurrent_locks) {
 217     // Release Heap_lock
 218     Heap_lock->unlock();
 219   }
 220 }
 221 
 222 void VM_PrintJNI::doit() {
 223   JNIHandles::print_on(_out);
 224 }
 225 
 226 void VM_PrintMetadata::doit() {
 227   MetaspaceUtils::print_report(_out, _scale, _flags);
 228 }
 229 
 230 VM_FindDeadlocks::~VM_FindDeadlocks() {
 231   if (_deadlocks != NULL) {
 232     DeadlockCycle* cycle = _deadlocks;
 233     while (cycle != NULL) {
 234       DeadlockCycle* d = cycle;
 235       cycle = cycle->next();
 236       delete d;
 237     }
 238   }
 239 }
 240 
 241 void VM_FindDeadlocks::doit() {
 242   // Update the hazard ptr in the originating thread to the current
 243   // list of threads. This VM operation needs the current list of
 244   // threads for proper deadlock detection and those are the
 245   // JavaThreads we need to be protected when we return info to the
 246   // originating thread.
 247   _setter.set();




  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 "gc/shared/collectedHeap.hpp"
  31 #include "gc/shared/isGCActiveMark.hpp"
  32 #include "logging/log.hpp"
  33 #include "logging/logStream.hpp"
  34 #include "logging/logConfiguration.hpp"
  35 #include "memory/heapInspection.hpp"
  36 #include "memory/metaspace/metaspaceReport.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "memory/universe.hpp"
  39 #include "oops/symbol.hpp"
  40 #include "runtime/arguments.hpp"
  41 #include "runtime/deoptimization.hpp"
  42 #include "runtime/frame.inline.hpp"
  43 #include "runtime/interfaceSupport.inline.hpp"
  44 #include "runtime/sweeper.hpp"
  45 #include "runtime/thread.inline.hpp"
  46 #include "runtime/threadSMR.inline.hpp"
  47 #include "runtime/vmOperations.hpp"
  48 #include "services/threadService.hpp"
  49 
  50 #define VM_OP_NAME_INITIALIZE(name) #name,
  51 
  52 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  53   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  54 
  55 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  56   _calling_thread = thread;


 208   }
 209   return true;
 210 }
 211 
 212 void VM_PrintThreads::doit() {
 213   Threads::print_on(_out, true, false, _print_concurrent_locks, _print_extended_info);
 214 }
 215 
 216 void VM_PrintThreads::doit_epilogue() {
 217   if (_print_concurrent_locks) {
 218     // Release Heap_lock
 219     Heap_lock->unlock();
 220   }
 221 }
 222 
 223 void VM_PrintJNI::doit() {
 224   JNIHandles::print_on(_out);
 225 }
 226 
 227 void VM_PrintMetadata::doit() {
 228   metaspace::MetaspaceReporter::print_report(_out, _scale, _flags);
 229 }
 230 
 231 VM_FindDeadlocks::~VM_FindDeadlocks() {
 232   if (_deadlocks != NULL) {
 233     DeadlockCycle* cycle = _deadlocks;
 234     while (cycle != NULL) {
 235       DeadlockCycle* d = cycle;
 236       cycle = cycle->next();
 237       delete d;
 238     }
 239   }
 240 }
 241 
 242 void VM_FindDeadlocks::doit() {
 243   // Update the hazard ptr in the originating thread to the current
 244   // list of threads. This VM operation needs the current list of
 245   // threads for proper deadlock detection and those are the
 246   // JavaThreads we need to be protected when we return info to the
 247   // originating thread.
 248   _setter.set();


< prev index next >