62 } |
62 } |
63 bool nmethod::is_compiled_by_c2() const { |
63 bool nmethod::is_compiled_by_c2() const { |
64 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing |
64 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing |
65 if (is_native_method()) return false; |
65 if (is_native_method()) return false; |
66 return compiler()->is_c2(); |
66 return compiler()->is_c2(); |
|
67 } |
|
68 bool nmethod::is_compiled_by_shark() const { |
|
69 if (is_native_method()) return false; |
|
70 assert(compiler() != NULL, "must be"); |
|
71 return compiler()->is_shark(); |
67 } |
72 } |
68 |
73 |
69 |
74 |
70 |
75 |
71 //--------------------------------------------------------------------------------- |
76 //--------------------------------------------------------------------------------- |
1767 } |
1776 } |
1768 |
1777 |
1769 // Method that knows how to preserve outgoing arguments at call. This method must be |
1778 // Method that knows how to preserve outgoing arguments at call. This method must be |
1770 // called with a frame corresponding to a Java invoke |
1779 // called with a frame corresponding to a Java invoke |
1771 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { |
1780 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { |
|
1781 #ifndef SHARK |
1772 if (!method()->is_native()) { |
1782 if (!method()->is_native()) { |
1773 SimpleScopeDesc ssd(this, fr.pc()); |
1783 SimpleScopeDesc ssd(this, fr.pc()); |
1774 Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci()); |
1784 Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci()); |
1775 bool has_receiver = call->has_receiver(); |
1785 bool has_receiver = call->has_receiver(); |
1776 symbolOop signature = call->signature(); |
1786 symbolOop signature = call->signature(); |
1777 fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f); |
1787 fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f); |
1778 } |
1788 } |
|
1789 #endif // !SHARK |
1779 } |
1790 } |
1780 |
1791 |
1781 |
1792 |
1782 oop nmethod::embeddedOop_at(u_char* p) { |
1793 oop nmethod::embeddedOop_at(u_char* p) { |
1783 RelocIterator iter(this, p, p + oopSize); |
1794 RelocIterator iter(this, p, p + oopSize); |
2277 |
2288 |
2278 if (is_compiled_by_c1()) { |
2289 if (is_compiled_by_c1()) { |
2279 tty->print("(c1) "); |
2290 tty->print("(c1) "); |
2280 } else if (is_compiled_by_c2()) { |
2291 } else if (is_compiled_by_c2()) { |
2281 tty->print("(c2) "); |
2292 tty->print("(c2) "); |
|
2293 } else if (is_compiled_by_shark()) { |
|
2294 tty->print("(shark) "); |
2282 } else { |
2295 } else { |
2283 tty->print("(nm) "); |
2296 tty->print("(nm) "); |
2284 } |
2297 } |
2285 |
2298 |
2286 print_on(tty, "nmethod"); |
2299 print_on(tty, "nmethod"); |