< prev index next >

src/hotspot/share/prims/jvmtiExport.hpp

Print this page




 153                                       char sig_type, jvalue *value);
 154 
 155 
 156   // posts a DynamicCodeGenerated event (internal/private implementation).
 157   // The public post_dynamic_code_generated* functions make use of the
 158   // internal implementation.  Also called from JvmtiDeferredEvent::post()
 159   static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN;
 160 
 161  private:
 162 
 163   // GenerateEvents support to allow posting of CompiledMethodLoad and
 164   // DynamicCodeGenerated events for a given environment.
 165   friend class JvmtiCodeBlobEvents;
 166 
 167   static void post_compiled_method_load(JvmtiEnv* env, const jmethodID method, const jint length,
 168                                         const void *code_begin, const jint map_length,
 169                                         const jvmtiAddrLocationMap* map) NOT_JVMTI_RETURN;
 170   static void post_dynamic_code_generated(JvmtiEnv* env, const char *name, const void *code_begin,
 171                                           const void *code_end) NOT_JVMTI_RETURN;
 172 
 173   // The RedefineClasses() API breaks some invariants in the "regular"
 174   // system. For example, there are sanity checks when GC'ing nmethods
 175   // that require the containing class to be unloading. However, when a
 176   // method is redefined, the old method and nmethod can become GC'able
 177   // without the containing class unloading. The state of becoming
 178   // GC'able can be asynchronous to the RedefineClasses() call since
 179   // the old method may still be running and cannot be GC'ed until
 180   // after all old invocations have finished. Additionally, a method
 181   // that has not been redefined may have an nmethod that depends on
 182   // the redefined method. The dependent nmethod will get deopted in
 183   // this case and may also be GC'able without the containing class
 184   // being unloaded.
 185   //
 186   // This flag indicates whether RedefineClasses() has ever redefined
 187   // one or more classes during the lifetime of the VM. The flag should
 188   // only be set by the friend class and can be queried by other sub
 189   // systems as needed to relax invariant checks.
 190   static bool _has_redefined_a_class;
 191   friend class VM_RedefineClasses;
 192   inline static void set_has_redefined_a_class() {
 193     JVMTI_ONLY(_has_redefined_a_class = true;)
 194   }
 195   // Flag to indicate if the compiler has recorded all dependencies. When the
 196   // can_redefine_classes capability is enabled in the OnLoad phase then the compiler
 197   // records all dependencies from startup. However if the capability is first
 198   // enabled some time later then the dependencies recorded by the compiler
 199   // are incomplete. This flag is used by RedefineClasses to know if the
 200   // dependency information is complete or not.
 201   static bool _all_dependencies_are_recorded;
 202 
 203  public:
 204   inline static bool has_redefined_a_class() {
 205     JVMTI_ONLY(return _has_redefined_a_class);




 153                                       char sig_type, jvalue *value);
 154 
 155 
 156   // posts a DynamicCodeGenerated event (internal/private implementation).
 157   // The public post_dynamic_code_generated* functions make use of the
 158   // internal implementation.  Also called from JvmtiDeferredEvent::post()
 159   static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN;
 160 
 161  private:
 162 
 163   // GenerateEvents support to allow posting of CompiledMethodLoad and
 164   // DynamicCodeGenerated events for a given environment.
 165   friend class JvmtiCodeBlobEvents;
 166 
 167   static void post_compiled_method_load(JvmtiEnv* env, const jmethodID method, const jint length,
 168                                         const void *code_begin, const jint map_length,
 169                                         const jvmtiAddrLocationMap* map) NOT_JVMTI_RETURN;
 170   static void post_dynamic_code_generated(JvmtiEnv* env, const char *name, const void *code_begin,
 171                                           const void *code_end) NOT_JVMTI_RETURN;
 172 













 173   // This flag indicates whether RedefineClasses() has ever redefined
 174   // one or more classes during the lifetime of the VM. The flag should
 175   // only be set by the friend class and can be queried by other sub
 176   // systems as needed to relax invariant checks.
 177   static bool _has_redefined_a_class;
 178   friend class VM_RedefineClasses;
 179   inline static void set_has_redefined_a_class() {
 180     JVMTI_ONLY(_has_redefined_a_class = true;)
 181   }
 182   // Flag to indicate if the compiler has recorded all dependencies. When the
 183   // can_redefine_classes capability is enabled in the OnLoad phase then the compiler
 184   // records all dependencies from startup. However if the capability is first
 185   // enabled some time later then the dependencies recorded by the compiler
 186   // are incomplete. This flag is used by RedefineClasses to know if the
 187   // dependency information is complete or not.
 188   static bool _all_dependencies_are_recorded;
 189 
 190  public:
 191   inline static bool has_redefined_a_class() {
 192     JVMTI_ONLY(return _has_redefined_a_class);


< prev index next >