60 // points to the decode function. 61 static decode_func_virtual _decode_instructions_virtual; 62 static decode_func _decode_instructions; 63 // tries to load library and return whether it succedded. 64 static bool load_library(); 65 66 // Machine dependent stuff 67 #include CPU_HEADER(disassembler) 68 69 public: 70 static bool can_decode() { 71 ttyLocker tl; 72 return (_decode_instructions_virtual != NULL) || 73 (_decode_instructions != NULL) || 74 load_library(); 75 } 76 static void decode(CodeBlob *cb, outputStream* st = NULL); 77 static void decode(nmethod* nm, outputStream* st = NULL); 78 static void decode(address begin, address end, outputStream* st = NULL, 79 CodeStrings c = CodeStrings(), ptrdiff_t offset = 0); 80 }; 81 82 #endif // SHARE_VM_COMPILER_DISASSEMBLER_HPP | 60 // points to the decode function. 61 static decode_func_virtual _decode_instructions_virtual; 62 static decode_func _decode_instructions; 63 // tries to load library and return whether it succedded. 64 static bool load_library(); 65 66 // Machine dependent stuff 67 #include CPU_HEADER(disassembler) 68 69 public: 70 static bool can_decode() { 71 ttyLocker tl; 72 return (_decode_instructions_virtual != NULL) || 73 (_decode_instructions != NULL) || 74 load_library(); 75 } 76 static void decode(CodeBlob *cb, outputStream* st = NULL); 77 static void decode(nmethod* nm, outputStream* st = NULL); 78 static void decode(address begin, address end, outputStream* st = NULL, 79 CodeStrings c = CodeStrings(), ptrdiff_t offset = 0); 80 static void _hook(const char* file, int line, class MacroAssembler* masm); 81 82 // This functions makes it easy to generate comments in the generated 83 // interpreter code, by riding on the customary __ macro in the interpreter generator. 84 // See templateTable_x86.cpp for an example. 85 template<class T> inline static T* hook(const char* file, int line, T* masm) { 86 if (PrintInterpreter) { 87 _hook(file, line, masm); 88 } 89 return masm; 90 } 91 }; 92 93 #endif // SHARE_VM_COMPILER_DISASSEMBLER_HPP |