src/share/vm/code/compiledIC.hpp

Print this page




 209   // State
 210   bool is_clean() const;
 211   bool is_megamorphic() const;
 212   bool is_call_to_compiled() const;
 213   bool is_call_to_interpreted() const;
 214 
 215   bool is_icholder_call() const;
 216 
 217   address end_of_call() { return  _ic_call->return_address(); }
 218 
 219   // MT-safe patching of inline caches. Note: Only safe to call is_xxx when holding the CompiledIC_ock
 220   // so you are guaranteed that no patching takes place. The same goes for verify.
 221   //
 222   // Note: We do not provide any direct access to the stub code, to prevent parts of the code
 223   // to manipulate the inline cache in MT-unsafe ways.
 224   //
 225   // They all takes a TRAP argument, since they can cause a GC if the inline-cache buffer is full.
 226   //
 227   void set_to_clean();  // Can only be called during a safepoint operation
 228   void set_to_monomorphic(CompiledICInfo& info);
 229   void set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS);



 230 
 231   static void compute_monomorphic_entry(methodHandle method, KlassHandle receiver_klass,
 232                                         bool is_optimized, bool static_bound, CompiledICInfo& info, TRAPS);
 233 
 234   // Location
 235   address instruction_address() const { return _ic_call->instruction_address(); }
 236 
 237   // Misc
 238   void print()             PRODUCT_RETURN;
 239   void print_compiled_ic() PRODUCT_RETURN;
 240   void verify()            PRODUCT_RETURN;
 241 };
 242 
 243 inline CompiledIC* CompiledIC_before(nmethod* nm, address return_addr) {
 244   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_before(return_addr));
 245   c_ic->verify();
 246   return c_ic;
 247 }
 248 
 249 inline CompiledIC* CompiledIC_at(nmethod* nm, address call_site) {




 209   // State
 210   bool is_clean() const;
 211   bool is_megamorphic() const;
 212   bool is_call_to_compiled() const;
 213   bool is_call_to_interpreted() const;
 214 
 215   bool is_icholder_call() const;
 216 
 217   address end_of_call() { return  _ic_call->return_address(); }
 218 
 219   // MT-safe patching of inline caches. Note: Only safe to call is_xxx when holding the CompiledIC_ock
 220   // so you are guaranteed that no patching takes place. The same goes for verify.
 221   //
 222   // Note: We do not provide any direct access to the stub code, to prevent parts of the code
 223   // to manipulate the inline cache in MT-unsafe ways.
 224   //
 225   // They all takes a TRAP argument, since they can cause a GC if the inline-cache buffer is full.
 226   //
 227   void set_to_clean();  // Can only be called during a safepoint operation
 228   void set_to_monomorphic(CompiledICInfo& info);
 229 
 230   // Returns true if successful and false otherwise. The call can fail if memory
 231   // allocation in the code cache fails.
 232   bool set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS);
 233 
 234   static void compute_monomorphic_entry(methodHandle method, KlassHandle receiver_klass,
 235                                         bool is_optimized, bool static_bound, CompiledICInfo& info, TRAPS);
 236 
 237   // Location
 238   address instruction_address() const { return _ic_call->instruction_address(); }
 239 
 240   // Misc
 241   void print()             PRODUCT_RETURN;
 242   void print_compiled_ic() PRODUCT_RETURN;
 243   void verify()            PRODUCT_RETURN;
 244 };
 245 
 246 inline CompiledIC* CompiledIC_before(nmethod* nm, address return_addr) {
 247   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_before(return_addr));
 248   c_ic->verify();
 249   return c_ic;
 250 }
 251 
 252 inline CompiledIC* CompiledIC_at(nmethod* nm, address call_site) {