mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 08:39:56 +00:00
8380219: Interpreter debugging would be easier if InterpreterCodelets could print their assembly code
Reviewed-by: dholmes, ayang
This commit is contained in:
parent
c6a20173a3
commit
2095051a10
@ -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<class T> inline static T* hook(const char* file, int line, T* masm) {
|
||||
if (PrintInterpreter) {
|
||||
if (PrintInterpreter NOT_PRODUCT(|| true)) {
|
||||
_hook(file, line, masm);
|
||||
}
|
||||
return masm;
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user