8213084: Rework and enhance Print[Opto]Assembly output

Reviewed-by: kvn, thartmann
This commit is contained in:
Lutz Schmidt 2019-05-21 15:51:35 +02:00
parent 6b2615be6a
commit b730805159
44 changed files with 2784 additions and 706 deletions

View file

@ -377,6 +377,7 @@ class nmethod : public CompiledMethod {
void make_unloaded();
bool has_dependencies() { return dependencies_size() != 0; }
void print_dependencies() PRODUCT_RETURN;
void flush_dependencies(bool delete_immediately);
bool has_flushed_dependencies() { return _has_flushed_dependencies; }
void set_has_flushed_dependencies() {
@ -505,18 +506,40 @@ public:
void verify_scopes();
void verify_interrupt_point(address interrupt_point);
// Disassemble this nmethod with additional debug information, e.g. information about blocks.
void decode2(outputStream* st) const;
void print_constant_pool(outputStream* st);
// Avoid hiding of parent's 'decode(outputStream*)' method.
void decode(outputStream* st) const { decode2(st); } // just delegate here.
// printing support
void print() const;
void print(outputStream* st) const;
void print_code();
#if defined(SUPPORT_DATA_STRUCTS)
// print output in opt build for disassembler library
void print_relocations() PRODUCT_RETURN;
void print_pcs() PRODUCT_RETURN;
void print_scopes() PRODUCT_RETURN;
void print_dependencies() PRODUCT_RETURN;
void print_value_on(outputStream* st) const PRODUCT_RETURN;
void print_pcs() { print_pcs_on(tty); }
void print_pcs_on(outputStream* st);
void print_scopes() { print_scopes_on(tty); }
void print_scopes_on(outputStream* st) PRODUCT_RETURN;
void print_value_on(outputStream* st) const;
void print_handler_table();
void print_nul_chk_table();
void print_recorded_oops();
void print_recorded_metadata();
void print_oops(outputStream* st); // oops from the underlying CodeBlob.
void print_metadata(outputStream* st); // metadata in metadata pool.
#else
// void print_pcs() PRODUCT_RETURN;
void print_pcs() { return; }
#endif
void print_calls(outputStream* st) PRODUCT_RETURN;
void print_handler_table() PRODUCT_RETURN;
void print_nul_chk_table() PRODUCT_RETURN;
void print_recorded_oops() PRODUCT_RETURN;
void print_recorded_metadata() PRODUCT_RETURN;
static void print_statistics() PRODUCT_RETURN;
void maybe_print_nmethod(DirectiveSet* directive);
void print_nmethod(bool print_code);
@ -532,14 +555,21 @@ public:
// Prints block-level comments, including nmethod specific block labels:
virtual void print_block_comment(outputStream* stream, address block_begin) const {
#if defined(SUPPORT_ASSEMBLY) || defined(SUPPORT_ABSTRACT_ASSEMBLY)
print_nmethod_labels(stream, block_begin);
CodeBlob::print_block_comment(stream, block_begin);
#endif
}
void print_nmethod_labels(outputStream* stream, address block_begin) const;
bool has_block_comment(address block_begin) {
return CodeBlob::has_block_comment(block_begin);
}
void print_nmethod_labels(outputStream* stream, address block_begin, bool print_section_labels=true) const;
const char* nmethod_section_label(address pos) const;
// returns whether this nmethod has code comments.
bool has_code_comment(address begin, address end);
// Prints a comment for one native instruction (reloc info, pc desc)
void print_code_comment_on(outputStream* st, int column, address begin, address end);
static void print_statistics() PRODUCT_RETURN;
// Compiler task identification. Note that all OSR methods
// are numbered in an independent sequence if CICountOSR is true,