--- old/src/hotspot/share/compiler/disassembler.hpp 2018-07-06 14:16:08.955842062 -0700 +++ new/src/hotspot/share/compiler/disassembler.hpp 2018-07-06 14:16:08.103809358 -0700 @@ -77,6 +77,17 @@ static void decode(nmethod* nm, outputStream* st = NULL); static void decode(address begin, address end, outputStream* st = NULL, CodeStrings c = CodeStrings(), ptrdiff_t offset = 0); + static void _hook(const char* file, int line, class MacroAssembler* masm); + + // This functions makes it easy to generate comments in the generated + // 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) { + _hook(file, line, masm); + } + return masm; + } }; #endif // SHARE_VM_COMPILER_DISASSEMBLER_HPP