338 CompiledIC *ic = CompiledIC_at(&iter);
339 if (TraceCompiledIC) {
340 tty->print("noticed icholder " INTPTR_FORMAT " ", p2i(ic->cached_icholder()));
341 ic->print();
342 }
343 assert(ic->cached_icholder() != NULL, "must be non-NULL");
344 count++;
345 }
346 }
347 }
348
349 return count;
350 }
351
352 // Method that knows how to preserve outgoing arguments at call. This method must be
353 // called with a frame corresponding to a Java invoke
354 void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
355 if (method() != NULL && !method()->is_native()) {
356 address pc = fr.pc();
357 SimpleScopeDesc ssd(this, pc);
358 Bytecode_invoke call(ssd.method(), ssd.bci());
359 bool has_receiver = call.has_receiver();
360 bool has_appendix = call.has_appendix();
361 Symbol* signature = call.signature();
362
363 // The method attached by JIT-compilers should be used, if present.
364 // Bytecode can be inaccurate in such case.
365 Method* callee = attached_method_before_pc(pc);
366 if (callee != NULL) {
367 has_receiver = !(callee->access_flags().is_static());
368 has_appendix = false;
369 signature = callee->signature();
370 }
371
372 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
373 }
374 }
375
376 Method* CompiledMethod::attached_method(address call_instr) {
377 assert(code_contains(call_instr), "not part of the nmethod");
378 RelocIterator iter(this, call_instr, call_instr + 1);
|
338 CompiledIC *ic = CompiledIC_at(&iter);
339 if (TraceCompiledIC) {
340 tty->print("noticed icholder " INTPTR_FORMAT " ", p2i(ic->cached_icholder()));
341 ic->print();
342 }
343 assert(ic->cached_icholder() != NULL, "must be non-NULL");
344 count++;
345 }
346 }
347 }
348
349 return count;
350 }
351
352 // Method that knows how to preserve outgoing arguments at call. This method must be
353 // called with a frame corresponding to a Java invoke
354 void CompiledMethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
355 if (method() != NULL && !method()->is_native()) {
356 address pc = fr.pc();
357 SimpleScopeDesc ssd(this, pc);
358 Bytecode_invoke call(methodHandle(Thread::current(), ssd.method()), ssd.bci());
359 bool has_receiver = call.has_receiver();
360 bool has_appendix = call.has_appendix();
361 Symbol* signature = call.signature();
362
363 // The method attached by JIT-compilers should be used, if present.
364 // Bytecode can be inaccurate in such case.
365 Method* callee = attached_method_before_pc(pc);
366 if (callee != NULL) {
367 has_receiver = !(callee->access_flags().is_static());
368 has_appendix = false;
369 signature = callee->signature();
370 }
371
372 fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
373 }
374 }
375
376 Method* CompiledMethod::attached_method(address call_instr) {
377 assert(code_contains(call_instr), "not part of the nmethod");
378 RelocIterator iter(this, call_instr, call_instr + 1);
|