Mercurial > hg > graal-compiler
diff src/share/vm/compiler/compileBroker.cpp @ 13364:5a4293f24642
added -G:PrintCompRate option for periodically printing out the current compilation rate
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 17 Dec 2013 16:45:02 +0100 |
parents | 91933915d1d0 |
children | 9161ed8ce796 |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Tue Dec 17 16:43:52 2013 +0100 +++ b/src/share/vm/compiler/compileBroker.cpp Tue Dec 17 16:45:02 2013 +0100 @@ -2311,7 +2311,7 @@ } } -void CompileBroker::print_times() { +void CompileBroker::print_times(bool per_compiler, bool aggregate) { #ifdef GRAAL elapsedTimer standard_compilation; elapsedTimer total_compilation; @@ -2331,7 +2331,7 @@ for (unsigned int i = 0; i < sizeof(_compilers) / sizeof(AbstractCompiler*); i++) { AbstractCompiler* comp = _compilers[i]; if (comp != NULL) { - if (!printedHeader) { + if (per_compiler && aggregate && !printedHeader) { printedHeader = true; tty->cr(); tty->print_cr("Individual compiler times (for compiled methods only)"); @@ -2352,11 +2352,13 @@ nmethods_size += stats->_nmethods_size; nmethods_code_size += stats->_nmethods_code_size; + if (per_compiler) { tty->print_cr(" %s {speed: %d bytes/s; standard: %6.3f s, %d bytes, %d methods; osr: %6.3f s, %d bytes, %d methods; nmethods_size: %d bytes; nmethods_code_size: %d bytes}", comp->name(), stats->bytes_per_second(), stats->_standard._time.seconds(), stats->_standard._bytes, stats->_standard._count, stats->_osr._time.seconds(), stats->_osr._bytes, stats->_osr._count, stats->_nmethods_size, stats->_nmethods_code_size); + } } } total_compile_count = osr_compile_count + standard_compile_count; @@ -2378,6 +2380,9 @@ int nmethods_code_size = CompileBroker::_sum_nmethod_size; #endif + if (!aggregate) { + return; + } tty->cr(); tty->print_cr("Accumulated compiler times (for compiled methods only)"); tty->print_cr("------------------------------------------------");