--- a/hotspot/src/share/vm/ci/ciEnv.cpp Tue Oct 20 13:36:20 2015 +0000
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp Tue Oct 20 18:07:28 2015 +0200
@@ -38,7 +38,8 @@
#include "code/scopeDesc.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compileLog.hpp"
-#include "compiler/compilerOracle.hpp"
+#include "compiler/compilerDirectives.hpp"
+#include "compiler/disassembler.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "interpreter/linkResolver.hpp"
#include "memory/allocation.inline.hpp"
@@ -956,9 +957,9 @@
ExceptionHandlerTable* handler_table,
ImplicitExceptionTable* inc_table,
AbstractCompiler* compiler,
- int comp_level,
bool has_unsafe_access,
bool has_wide_vectors,
+ DirectiveSet* directives,
RTMState rtm_state) {
VM_ENTRY_MARK;
nmethod* nm = NULL;
@@ -1034,11 +1035,20 @@
debug_info(), dependencies(), code_buffer,
frame_words, oop_map_set,
handler_table, inc_table,
- compiler, comp_level);
+ compiler, task()->comp_level());
+
// Free codeBlobs
code_buffer->free_blob();
if (nm != NULL) {
+ bool printnmethods = directives->PrintAssemblyOption || directives->PrintNMethodsOption;
+ if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) {
+ nm->print_nmethod(printnmethods);
+ }
+ if (directives->PrintAssemblyOption) {
+ Disassembler::decode(nm);
+ }
+
nm->set_has_unsafe_access(has_unsafe_access);
nm->set_has_wide_vectors(has_wide_vectors);
#if INCLUDE_RTM_OPT
@@ -1069,7 +1079,7 @@
char *method_name = method->name_and_sig_as_C_string();
ttyLocker ttyl;
tty->print_cr("Installing method (%d) %s ",
- comp_level,
+ task()->comp_level(),
method_name);
}
// Allow the code to be executed
@@ -1080,7 +1090,7 @@
char *method_name = method->name_and_sig_as_C_string();
ttyLocker ttyl;
tty->print_cr("Installing osr method (%d) %s @ %d",
- comp_level,
+ task()->comp_level(),
method_name,
entry_bci);
}