< prev index next >

src/hotspot/share/code/compiledMethod.hpp


334   virtual const char* compile_kind() const = 0;                                                                                      
335   virtual int get_state() const = 0;                                                                                                 
336 
337   const char* state() const;                                                                                                         
338 
339   bool is_far_code() const { return _is_far_code; }                                                                                  
340 
341   bool inlinecache_check_contains(address addr) const {                                                                              
342     return (addr >= code_begin() && addr < verified_entry_point());                                                                  
343   }                                                                                                                                  
344 
345   void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f);                                           
346 
347   // implicit exceptions support                                                                                                     
348   virtual address continuation_for_implicit_exception(address pc) { return NULL; }                                                   
349 
350   static address get_deopt_original_pc(const frame* fr);                                                                             
351 
352   // Inline cache support for class unloading and nmethod unloading                                                                  
353  private:                                                                                                                            
354   void cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all);                                                          
                                                                                                                                     
355  public:                                                                                                                             
356   void cleanup_inline_caches(bool clean_all) {                                                                                       
357     // Serial version used by sweeper and whitebox test                                                                              
358     cleanup_inline_caches_impl(false, clean_all);                                                                                    
359   }                                                                                                                                  
360 
361   virtual void clear_inline_caches();                                                                                                
362   void clear_ic_stubs();                                                                                                             
363 
364   // Verify and count cached icholder relocations.                                                                                   
365   int  verify_icholder_relocations();                                                                                                
366   void verify_oop_relocations();                                                                                                     
367 
368   virtual bool is_evol_dependent_on(Klass* dependee) = 0;                                                                            
369   // Fast breakpoint support. Tells if this compiled method is                                                                       
370   // dependent on the given method. Returns true if this nmethod                                                                     
371   // corresponds to the given method as well.                                                                                        
372   virtual bool is_dependent_on_method(Method* dependee) = 0;                                                                         
373 
374   virtual NativeCallWrapper* call_wrapper_at(address call) const = 0;                                                                
375   virtual NativeCallWrapper* call_wrapper_before(address return_pc) const = 0;                                                       
376   virtual address call_instruction_address(address pc) const = 0;                                                                    
377 
378   virtual CompiledStaticCall* compiledStaticCall_at(Relocation* call_site) const = 0;                                                
379   virtual CompiledStaticCall* compiledStaticCall_at(address addr) const = 0;                                                         
380   virtual CompiledStaticCall* compiledStaticCall_before(address addr) const = 0;                                                     
381 
382   Method* attached_method(address call_pc);                                                                                          
383   Method* attached_method_before_pc(address pc);                                                                                     
384 
385   virtual void metadata_do(void f(Metadata*)) = 0;                                                                                   
386 
387   // GC support                                                                                                                      
388  protected:                                                                                                                          
389   address oops_reloc_begin() const;                                                                                                  
390 
391  private:                                                                                                                            
392   void static clean_ic_if_metadata_is_dead(CompiledIC *ic);                                                                          
393 
394   void clean_ic_stubs();                                                                                                             
395 
396  public:                                                                                                                             
397   // GC unloading support                                                                                                            
398   // Cleans unloaded klasses and unloaded nmethods in inline caches                                                                  
399 
400   virtual bool is_unloading() = 0;                                                                                                   
401 
402   void unload_nmethod_caches(bool class_unloading_occurred);                                                                         
403   virtual void do_unloading(bool unloading_occurred) { }                                                                             
404 
405 private:                                                                                                                             
406   PcDesc* find_pc_desc(address pc, bool approximate) {                                                                               
407     return _pc_desc_container.find_pc_desc(pc, approximate, PcDescSearch(code_begin(), scopes_pcs_begin(), scopes_pcs_end()));       
408   }                                                                                                                                  
409 
410 protected:                                                                                                                           
411   // Used by some GCs to chain nmethods.                                                                                             
412   nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods                                                            
413 };                                                                                                                                   
414 
415 #endif //SHARE_VM_CODE_COMPILEDMETHOD_HPP                                                                                            

334   virtual const char* compile_kind() const = 0;
335   virtual int get_state() const = 0;
336 
337   const char* state() const;
338 
339   bool is_far_code() const { return _is_far_code; }
340 
341   bool inlinecache_check_contains(address addr) const {
342     return (addr >= code_begin() && addr < verified_entry_point());
343   }
344 
345   void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f);
346 
347   // implicit exceptions support
348   virtual address continuation_for_implicit_exception(address pc) { return NULL; }
349 
350   static address get_deopt_original_pc(const frame* fr);
351 
352   // Inline cache support for class unloading and nmethod unloading
353  private:
354   bool cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all);
355 
356  public:
357   // Serial version used by sweeper and whitebox test
358   void cleanup_inline_caches(bool clean_all);


359 
360   virtual void clear_inline_caches();
361   void clear_ic_stubs();
362 
363   // Verify and count cached icholder relocations.
364   int  verify_icholder_relocations();
365   void verify_oop_relocations();
366 
367   virtual bool is_evol_dependent_on(Klass* dependee) = 0;
368   // Fast breakpoint support. Tells if this compiled method is
369   // dependent on the given method. Returns true if this nmethod
370   // corresponds to the given method as well.
371   virtual bool is_dependent_on_method(Method* dependee) = 0;
372 
373   virtual NativeCallWrapper* call_wrapper_at(address call) const = 0;
374   virtual NativeCallWrapper* call_wrapper_before(address return_pc) const = 0;
375   virtual address call_instruction_address(address pc) const = 0;
376 
377   virtual CompiledStaticCall* compiledStaticCall_at(Relocation* call_site) const = 0;
378   virtual CompiledStaticCall* compiledStaticCall_at(address addr) const = 0;
379   virtual CompiledStaticCall* compiledStaticCall_before(address addr) const = 0;
380 
381   Method* attached_method(address call_pc);
382   Method* attached_method_before_pc(address pc);
383 
384   virtual void metadata_do(void f(Metadata*)) = 0;
385 
386   // GC support
387  protected:
388   address oops_reloc_begin() const;
389 
390  private:
391   bool static clean_ic_if_metadata_is_dead(CompiledIC *ic);
392 
393   void clean_ic_stubs();
394 
395  public:
396   // GC unloading support
397   // Cleans unloaded klasses and unloaded nmethods in inline caches
398 
399   virtual bool is_unloading() = 0;
400 
401   bool unload_nmethod_caches(bool class_unloading_occurred);
402   virtual void do_unloading(bool unloading_occurred) { }
403 
404 private:
405   PcDesc* find_pc_desc(address pc, bool approximate) {
406     return _pc_desc_container.find_pc_desc(pc, approximate, PcDescSearch(code_begin(), scopes_pcs_begin(), scopes_pcs_end()));
407   }
408 
409 protected:
410   // Used by some GCs to chain nmethods.
411   nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods
412 };
413 
414 #endif //SHARE_VM_CODE_COMPILEDMETHOD_HPP
< prev index next >