< prev index next >

src/hotspot/share/code/compiledMethod.hpp

Print this page

189   // Only used by unit test.
190   CompiledMethod() {}
191 
192   template<typename T>
193   T* gc_data() const                              { return reinterpret_cast<T*>(_gc_data); }
194   template<typename T>
195   void set_gc_data(T* gc_data)                    { _gc_data = reinterpret_cast<void*>(gc_data); }
196 
197   bool  has_unsafe_access() const                 { return _has_unsafe_access; }
198   void  set_has_unsafe_access(bool z)             { _has_unsafe_access = z; }
199 
200   bool  has_monitors() const                      { return _has_monitors; }
201   void  set_has_monitors(bool z)                  { _has_monitors = z; }
202 
203   bool  has_method_handle_invokes() const         { return _has_method_handle_invokes; }
204   void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
205 
206   bool  has_wide_vectors() const                  { return _has_wide_vectors; }
207   void  set_has_wide_vectors(bool z)              { _has_wide_vectors = z; }
208 










209   enum : signed char { not_installed = -1, // in construction, only the owner doing the construction is
210                                            // allowed to advance state
211                        in_use        = 0,  // executable nmethod
212                        not_used      = 1,  // not entrant, but revivable
213                        not_entrant   = 2,  // marked for deoptimization but activations may still exist
214   };
215 
216   virtual bool  is_in_use() const = 0;
217   virtual int   comp_level() const = 0;
218   virtual int   compile_id() const = 0;
219 
220   virtual address verified_entry_point() const = 0;


221   virtual void log_identity(xmlStream* log) const = 0;
222   virtual void log_state_change() const = 0;
223   virtual bool make_not_used() = 0;
224   virtual bool make_not_entrant() = 0;
225   virtual bool make_entrant() = 0;
226   virtual address entry_point() const = 0;

227   virtual bool is_osr_method() const = 0;
228   virtual int osr_entry_bci() const = 0;
229   Method* method() const                          { return _method; }
230   virtual void print_pcs() = 0;
231   bool is_native_method() const { return _method != nullptr && _method->is_native(); }
232   bool is_java_method() const { return _method != nullptr && !_method->is_native(); }
233 
234   // ScopeDesc retrieval operation
235   PcDesc* pc_desc_at(address pc)   { return find_pc_desc(pc, false); }
236   // pc_desc_near returns the first PcDesc at or after the given pc.
237   PcDesc* pc_desc_near(address pc) { return find_pc_desc(pc, true); }
238 
239   // ScopeDesc for an instruction
240   ScopeDesc* scope_desc_at(address pc);
241   ScopeDesc* scope_desc_near(address pc);
242 
243   bool is_at_poll_return(address pc);
244   bool is_at_poll_or_poll_return(address pc);
245 
246   bool  is_marked_for_deoptimization() const { return deoptimization_status() != not_marked; }

189   // Only used by unit test.
190   CompiledMethod() {}
191 
192   template<typename T>
193   T* gc_data() const                              { return reinterpret_cast<T*>(_gc_data); }
194   template<typename T>
195   void set_gc_data(T* gc_data)                    { _gc_data = reinterpret_cast<void*>(gc_data); }
196 
197   bool  has_unsafe_access() const                 { return _has_unsafe_access; }
198   void  set_has_unsafe_access(bool z)             { _has_unsafe_access = z; }
199 
200   bool  has_monitors() const                      { return _has_monitors; }
201   void  set_has_monitors(bool z)                  { _has_monitors = z; }
202 
203   bool  has_method_handle_invokes() const         { return _has_method_handle_invokes; }
204   void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
205 
206   bool  has_wide_vectors() const                  { return _has_wide_vectors; }
207   void  set_has_wide_vectors(bool z)              { _has_wide_vectors = z; }
208 
209   bool  needs_stack_repair() const {
210     if (is_compiled_by_c1()) {
211       return method()->c1_needs_stack_repair();
212     } else if (is_compiled_by_c2()) {
213       return method()->c2_needs_stack_repair();
214     } else {
215       return false;
216     }
217   }
218 
219   enum : signed char { not_installed = -1, // in construction, only the owner doing the construction is
220                                            // allowed to advance state
221                        in_use        = 0,  // executable nmethod
222                        not_used      = 1,  // not entrant, but revivable
223                        not_entrant   = 2,  // marked for deoptimization but activations may still exist
224   };
225 
226   virtual bool  is_in_use() const = 0;
227   virtual int   comp_level() const = 0;
228   virtual int   compile_id() const = 0;
229 
230   virtual address verified_entry_point() const = 0;
231   virtual address verified_inline_entry_point() const = 0;
232   virtual address verified_inline_ro_entry_point() const = 0;
233   virtual void log_identity(xmlStream* log) const = 0;
234   virtual void log_state_change() const = 0;
235   virtual bool make_not_used() = 0;
236   virtual bool make_not_entrant() = 0;
237   virtual bool make_entrant() = 0;
238   virtual address entry_point() const = 0;
239   virtual address inline_entry_point() const = 0;
240   virtual bool is_osr_method() const = 0;
241   virtual int osr_entry_bci() const = 0;
242   Method* method() const                          { return _method; }
243   virtual void print_pcs() = 0;
244   bool is_native_method() const { return _method != nullptr && _method->is_native(); }
245   bool is_java_method() const { return _method != nullptr && !_method->is_native(); }
246 
247   // ScopeDesc retrieval operation
248   PcDesc* pc_desc_at(address pc)   { return find_pc_desc(pc, false); }
249   // pc_desc_near returns the first PcDesc at or after the given pc.
250   PcDesc* pc_desc_near(address pc) { return find_pc_desc(pc, true); }
251 
252   // ScopeDesc for an instruction
253   ScopeDesc* scope_desc_at(address pc);
254   ScopeDesc* scope_desc_near(address pc);
255 
256   bool is_at_poll_return(address pc);
257   bool is_at_poll_or_poll_return(address pc);
258 
259   bool  is_marked_for_deoptimization() const { return deoptimization_status() != not_marked; }
< prev index next >