diff --git a/src/hotspot/share/compiler/disassembler.hpp b/src/hotspot/share/compiler/disassembler.hpp index db7066c9023..b9de9c3d27d 100644 --- a/src/hotspot/share/compiler/disassembler.hpp +++ b/src/hotspot/share/compiler/disassembler.hpp @@ -112,7 +112,7 @@ class Disassembler : public AbstractDisassembler { // interpreter code, by riding on the customary __ macro in the interpreter generator. // See templateTable_x86.cpp for an example. template inline static T* hook(const char* file, int line, T* masm) { - if (PrintInterpreter) { + if (PrintInterpreter NOT_PRODUCT(|| true)) { _hook(file, line, masm); } return masm; diff --git a/src/hotspot/share/interpreter/interpreter.cpp b/src/hotspot/share/interpreter/interpreter.cpp index 2cc163186e8..1f327152e0c 100644 --- a/src/hotspot/share/interpreter/interpreter.cpp +++ b/src/hotspot/share/interpreter/interpreter.cpp @@ -61,10 +61,10 @@ void InterpreterCodelet::initialize(const char* description, Bytecodes::Code byt void InterpreterCodelet::verify() {} -void InterpreterCodelet::print_on(outputStream* st) const { +void InterpreterCodelet::print_on(outputStream* st, bool print_code) const { ttyLocker ttyl; - if (AbstractInterpreter::should_print_instructions()) { + if (print_code) { st->cr(); st->print_cr("----------------------------------------------------------------------"); } @@ -74,12 +74,16 @@ void InterpreterCodelet::print_on(outputStream* st) const { st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "] %d bytes", p2i(code_begin()), p2i(code_end()), code_size()); - if (AbstractInterpreter::should_print_instructions()) { + if (print_code) { st->cr(); Disassembler::decode(code_begin(), code_end(), st NOT_PRODUCT(COMMA &_asm_remarks)); } } +void InterpreterCodelet::print_on(outputStream* st) const { + print_on(st, AbstractInterpreter::should_print_instructions()); +} + void InterpreterCodelet::print() const { print_on(tty); } CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm, diff --git a/src/hotspot/share/interpreter/interpreter.hpp b/src/hotspot/share/interpreter/interpreter.hpp index f7d42fcb4da..fb368638332 100644 --- a/src/hotspot/share/interpreter/interpreter.hpp +++ b/src/hotspot/share/interpreter/interpreter.hpp @@ -67,6 +67,7 @@ class InterpreterCodelet: public Stub { // Debugging void verify(); + void print_on(outputStream* st, bool print_code) const; void print_on(outputStream* st) const; void print() const;