Mercurial > hg > graal-compiler
diff src/share/vm/compiler/compileBroker.cpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | a31028282e3e cc81b9c09bbb |
children | feb590a8497f |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Sat Dec 17 20:50:09 2011 +0100 +++ b/src/share/vm/compiler/compileBroker.cpp Sat Dec 17 21:40:27 2011 +0100 @@ -59,6 +59,7 @@ // Only bother with this argument setup if dtrace is available +#ifndef USDT2 HS_DTRACE_PROBE_DECL8(hotspot, method__compile__begin, char*, intptr_t, char*, intptr_t, char*, intptr_t, char*, intptr_t); HS_DTRACE_PROBE_DECL9(hotspot, method__compile__end, @@ -90,6 +91,35 @@ signature->bytes(), signature->utf8_length(), (success)); \ } +#else /* USDT2 */ + +#define DTRACE_METHOD_COMPILE_BEGIN_PROBE(compiler, method) \ + { \ + char* comp_name = (char*)(compiler)->name(); \ + Symbol* klass_name = (method)->klass_name(); \ + Symbol* name = (method)->name(); \ + Symbol* signature = (method)->signature(); \ + HOTSPOT_METHOD_COMPILE_BEGIN( \ + comp_name, strlen(comp_name), \ + (char *) klass_name->bytes(), klass_name->utf8_length(), \ + (char *) name->bytes(), name->utf8_length(), \ + (char *) signature->bytes(), signature->utf8_length()); \ + } + +#define DTRACE_METHOD_COMPILE_END_PROBE(compiler, method, success) \ + { \ + char* comp_name = (char*)(compiler)->name(); \ + Symbol* klass_name = (method)->klass_name(); \ + Symbol* name = (method)->name(); \ + Symbol* signature = (method)->signature(); \ + HOTSPOT_METHOD_COMPILE_END( \ + comp_name, strlen(comp_name), \ + (char *) klass_name->bytes(), klass_name->utf8_length(), \ + (char *) name->bytes(), name->utf8_length(), \ + (char *) signature->bytes(), signature->utf8_length(), (success)); \ + } +#endif /* USDT2 */ + #else // ndef DTRACE_ENABLED #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(compiler, method) @@ -1756,11 +1786,11 @@ if (PrintCompilation) { const char* reason = ci_env.failure_reason(); if (compilable == ciEnv::MethodCompilable_not_at_tier) { - tty->print_cr("%3d COMPILE SKIPPED: %s (retry at different tier)", compile_id, reason); + tty->print_cr("%4d COMPILE SKIPPED: %s (retry at different tier)", compile_id, reason); } else if (compilable == ciEnv::MethodCompilable_never) { - tty->print_cr("%3d COMPILE SKIPPED: %s (not retryable)", compile_id, reason); + tty->print_cr("%4d COMPILE SKIPPED: %s (not retryable)", compile_id, reason); } else if (compilable == ciEnv::MethodCompilable) { - tty->print_cr("%3d COMPILE SKIPPED: %s", compile_id, reason); + tty->print_cr("%4d COMPILE SKIPPED: %s", compile_id, reason); } } } else { @@ -1777,6 +1807,14 @@ collect_statistics(thread, time, task); + if (PrintCompilation && PrintCompilation2) { + tty->print("%7d ", (int) tty->time_stamp().milliseconds()); // print timestamp + tty->print("%4d ", compile_id); // print compilation number + tty->print("%s ", (is_osr ? "%" : " ")); + int code_size = (task->code() == NULL) ? 0 : task->code()->total_size(); + tty->print_cr("size: %d time: %d inlined: %d bytes", code_size, (int)time.milliseconds(), task->num_inlined_bytecodes()); + } + if (compilable == ciEnv::MethodCompilable_never) { if (is_osr) { method->set_not_osr_compilable();