Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompilerToVM.cpp @ 8526:3a105dec912f
Respect the PrintCodeCacheOnCompilation flag in the graal compiler
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 27 Mar 2013 14:20:07 +0100 |
parents | c36e8ded27d4 |
children | 8a526d8b4604 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Wed Mar 27 11:53:31 2013 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Wed Mar 27 14:20:07 2013 +0100 @@ -814,6 +814,17 @@ GraalEnv::CodeInstallResult result; CodeInstaller installer(compResultHandle, method, result, nm, installed_code_handle, triggered_deoptimizations_handle); + if (PrintCodeCacheOnCompilation) { + stringStream s; + // Dump code cache into a buffer before locking the tty, + { + MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); + CodeCache::print_summary(&s, false); + } + ttyLocker ttyl; + tty->print_cr(s.as_string()); + } + if (result != GraalEnv::ok) { assert(nm == NULL, "should be"); } else {