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