diff --git a/src/hotspot/share/interpreter/bytecodeTracer.cpp b/src/hotspot/share/interpreter/bytecodeTracer.cpp index 4115a2bede5..798c0bfc7d8 100644 --- a/src/hotspot/share/interpreter/bytecodeTracer.cpp +++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp @@ -178,6 +178,7 @@ class BytecodePrinter { } }; +#ifndef PRODUCT // We need a global instance to keep track of the states when the bytecodes // are executed. Access by multiple threads are controlled by ttyLocker. static BytecodePrinter _interpreter_printer; @@ -193,6 +194,7 @@ void BytecodeTracer::trace_interpreter(const methodHandle& method, address bcp, _interpreter_printer.trace(method, bcp, tos, tos2, st); } } +#endif void BytecodeTracer::print_method_codes(const methodHandle& method, int from, int to, outputStream* st, int flags) { BytecodePrinter method_printer(flags); diff --git a/src/hotspot/share/interpreter/bytecodeTracer.hpp b/src/hotspot/share/interpreter/bytecodeTracer.hpp index f870ffc415e..e7d7a360948 100644 --- a/src/hotspot/share/interpreter/bytecodeTracer.hpp +++ b/src/hotspot/share/interpreter/bytecodeTracer.hpp @@ -38,7 +38,7 @@ class outputStream; class BytecodeClosure; class BytecodeTracer: AllStatic { public: - static void trace_interpreter(const methodHandle& method, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st = tty); + NOT_PRODUCT(static void trace_interpreter(const methodHandle& method, address bcp, uintptr_t tos, uintptr_t tos2, outputStream* st = tty);) static void print_method_codes(const methodHandle& method, int from, int to, outputStream* st, int flags); };