src/hotspot/share/code/compiledMethod.hpp
changeset 50416 ef980b9ac191
parent 49890 29b94ed63a09
child 51473 871581ff5ce5
equal deleted inserted replaced
50415:e4301f8c3aaa 50416:ef980b9ac191
   329   // implicit exceptions support
   329   // implicit exceptions support
   330   virtual address continuation_for_implicit_exception(address pc) { return NULL; }
   330   virtual address continuation_for_implicit_exception(address pc) { return NULL; }
   331 
   331 
   332   static address get_deopt_original_pc(const frame* fr);
   332   static address get_deopt_original_pc(const frame* fr);
   333 
   333 
   334   // Inline cache support
   334   // GC unloading support
   335   void cleanup_inline_caches(bool clean_all = false);
   335   // Cleans unloaded klasses and unloaded nmethods in inline caches
       
   336   bool unload_nmethod_caches(bool parallel, bool class_unloading_occurred);
       
   337 
       
   338   // Inline cache support for class unloading and nmethod unloading
       
   339  private:
       
   340   bool cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all);
       
   341  public:
       
   342   bool cleanup_inline_caches(bool clean_all = false) {
       
   343     // Serial version used by sweeper and whitebox test
       
   344     return cleanup_inline_caches_impl(false, false, clean_all);
       
   345   }
       
   346 
   336   virtual void clear_inline_caches();
   347   virtual void clear_inline_caches();
   337   void clear_ic_stubs();
   348   void clear_ic_stubs();
   338 
   349 
   339   // Verify and count cached icholder relocations.
   350   // Verify and count cached icholder relocations.
   340   int  verify_icholder_relocations();
   351   int  verify_icholder_relocations();
   362   // GC support
   373   // GC support
   363 
   374 
   364   void set_unloading_next(CompiledMethod* next) { _unloading_next = next; }
   375   void set_unloading_next(CompiledMethod* next) { _unloading_next = next; }
   365   CompiledMethod* unloading_next()              { return _unloading_next; }
   376   CompiledMethod* unloading_next()              { return _unloading_next; }
   366 
   377 
       
   378  protected:
       
   379   address oops_reloc_begin() const;
       
   380  private:
   367   void static clean_ic_if_metadata_is_dead(CompiledIC *ic);
   381   void static clean_ic_if_metadata_is_dead(CompiledIC *ic);
   368 
   382 
   369   // Check that all metadata is still alive
   383   void clean_ic_stubs();
   370   void verify_metadata_loaders(address low_boundary);
   384 
   371 
   385  public:
   372   virtual void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
   386   virtual void do_unloading(BoolObjectClosure* is_alive);
   373   //  The parallel versions are used by G1.
   387   //  The parallel versions are used by G1.
   374   virtual bool do_unloading_parallel(BoolObjectClosure* is_alive, bool unloading_occurred);
   388   virtual bool do_unloading_parallel(BoolObjectClosure* is_alive, bool unloading_occurred);
   375   virtual void do_unloading_parallel_postponed();
   389   virtual void do_unloading_parallel_postponed();
   376 
   390 
   377   static unsigned char global_unloading_clock()   { return _global_unloading_clock; }
   391   static unsigned char global_unloading_clock()   { return _global_unloading_clock; }
   379 
   393 
   380   void set_unloading_clock(unsigned char unloading_clock);
   394   void set_unloading_clock(unsigned char unloading_clock);
   381   unsigned char unloading_clock();
   395   unsigned char unloading_clock();
   382 
   396 
   383 protected:
   397 protected:
   384   virtual bool do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive, bool unloading_occurred) = 0;
   398   virtual bool do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive) = 0;
   385 #if INCLUDE_JVMCI
   399 #if INCLUDE_JVMCI
   386   virtual bool do_unloading_jvmci(bool unloading_occurred) = 0;
   400   virtual bool do_unloading_jvmci() = 0;
   387 #endif
   401 #endif
   388 
   402 
   389 private:
   403 private:
   390   // GC support to help figure out if an nmethod has been
   404   // GC support to help figure out if an nmethod has been
   391   // cleaned/unloaded by the current GC.
   405   // cleaned/unloaded by the current GC.