< prev index next >

src/hotspot/share/jvmci/jvmciEnv.cpp

Print this page




  27 #include "classfile/symbolTable.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "memory/oopFactory.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "memory/universe.hpp"
  32 #include "oops/objArrayKlass.hpp"
  33 #include "oops/typeArrayOop.inline.hpp"
  34 #include "runtime/deoptimization.hpp"
  35 #include "runtime/jniHandles.inline.hpp"
  36 #include "runtime/javaCalls.hpp"
  37 #include "jvmci/jniAccessMark.inline.hpp"
  38 #include "jvmci/jvmciRuntime.hpp"
  39 
  40 JVMCICompileState::JVMCICompileState(CompileTask* task):
  41   _task(task),
  42   _retryable(true),
  43   _failure_reason(NULL),
  44   _failure_reason_on_C_heap(false) {
  45   // Get Jvmti capabilities under lock to get consistent values.
  46   MutexLocker mu(JvmtiThreadState_lock);

  47   _jvmti_can_hotswap_or_post_breakpoint = JvmtiExport::can_hotswap_or_post_breakpoint() ? 1 : 0;
  48   _jvmti_can_access_local_variables     = JvmtiExport::can_access_local_variables() ? 1 : 0;
  49   _jvmti_can_post_on_exceptions         = JvmtiExport::can_post_on_exceptions() ? 1 : 0;
  50   _jvmti_can_pop_frame                  = JvmtiExport::can_pop_frame() ? 1 : 0;
  51 }
  52 
  53 bool JVMCICompileState::jvmti_state_changed() const {




  54   if (!jvmti_can_access_local_variables() &&
  55       JvmtiExport::can_access_local_variables()) {
  56     return true;
  57   }
  58   if (!jvmti_can_hotswap_or_post_breakpoint() &&
  59       JvmtiExport::can_hotswap_or_post_breakpoint()) {
  60     return true;
  61   }
  62   if (!jvmti_can_post_on_exceptions() &&
  63       JvmtiExport::can_post_on_exceptions()) {
  64     return true;
  65   }
  66   if (!jvmti_can_pop_frame() &&
  67       JvmtiExport::can_pop_frame()) {
  68     return true;
  69   }
  70   return false;
  71 }
  72 
  73 JavaVM* JVMCIEnv::_shared_library_javavm = NULL;




  27 #include "classfile/symbolTable.hpp"
  28 #include "code/codeCache.hpp"
  29 #include "memory/oopFactory.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "memory/universe.hpp"
  32 #include "oops/objArrayKlass.hpp"
  33 #include "oops/typeArrayOop.inline.hpp"
  34 #include "runtime/deoptimization.hpp"
  35 #include "runtime/jniHandles.inline.hpp"
  36 #include "runtime/javaCalls.hpp"
  37 #include "jvmci/jniAccessMark.inline.hpp"
  38 #include "jvmci/jvmciRuntime.hpp"
  39 
  40 JVMCICompileState::JVMCICompileState(CompileTask* task):
  41   _task(task),
  42   _retryable(true),
  43   _failure_reason(NULL),
  44   _failure_reason_on_C_heap(false) {
  45   // Get Jvmti capabilities under lock to get consistent values.
  46   MutexLocker mu(JvmtiThreadState_lock);
  47   _jvmti_redefinition_count             = JvmtiExport::redefinition_count();
  48   _jvmti_can_hotswap_or_post_breakpoint = JvmtiExport::can_hotswap_or_post_breakpoint() ? 1 : 0;
  49   _jvmti_can_access_local_variables     = JvmtiExport::can_access_local_variables() ? 1 : 0;
  50   _jvmti_can_post_on_exceptions         = JvmtiExport::can_post_on_exceptions() ? 1 : 0;
  51   _jvmti_can_pop_frame                  = JvmtiExport::can_pop_frame() ? 1 : 0;
  52 }
  53 
  54 bool JVMCICompileState::jvmti_state_changed() const {
  55   // Some classes were redefined
  56   if (_jvmti_redefinition_count != JvmtiExport::redefinition_count()) {
  57     return true;
  58   }
  59   if (!jvmti_can_access_local_variables() &&
  60       JvmtiExport::can_access_local_variables()) {
  61     return true;
  62   }
  63   if (!jvmti_can_hotswap_or_post_breakpoint() &&
  64       JvmtiExport::can_hotswap_or_post_breakpoint()) {
  65     return true;
  66   }
  67   if (!jvmti_can_post_on_exceptions() &&
  68       JvmtiExport::can_post_on_exceptions()) {
  69     return true;
  70   }
  71   if (!jvmti_can_pop_frame() &&
  72       JvmtiExport::can_pop_frame()) {
  73     return true;
  74   }
  75   return false;
  76 }
  77 
  78 JavaVM* JVMCIEnv::_shared_library_javavm = NULL;


< prev index next >