mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8244207: Simplify usage of Compile::print_method() when debugging with gdb and enable its use with rr
Improve debugging with usage of Compile::print_method() for IGV at breakpoints from gdb and rr. Reviewed-by: kvn, thartmann
This commit is contained in:
parent
ceda3089db
commit
3887904c16
5 changed files with 195 additions and 69 deletions
|
@ -317,6 +317,8 @@ class Compile : public Phase {
|
|||
ConnectionGraph* _congraph;
|
||||
#ifndef PRODUCT
|
||||
IdealGraphPrinter* _printer;
|
||||
static IdealGraphPrinter* _debug_file_printer;
|
||||
static IdealGraphPrinter* _debug_network_printer;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -639,9 +641,9 @@ class Compile : public Phase {
|
|||
if (should_print(level)) {
|
||||
char output[1024];
|
||||
if (idx != 0) {
|
||||
sprintf(output, "%s:%d", CompilerPhaseTypeHelper::to_string(cpt), idx);
|
||||
jio_snprintf(output, sizeof(output), "%s:%d", CompilerPhaseTypeHelper::to_string(cpt), idx);
|
||||
} else {
|
||||
sprintf(output, "%s", CompilerPhaseTypeHelper::to_string(cpt));
|
||||
jio_snprintf(output, sizeof(output), "%s", CompilerPhaseTypeHelper::to_string(cpt));
|
||||
}
|
||||
_printer->print_method(output, level);
|
||||
}
|
||||
|
@ -649,6 +651,13 @@ class Compile : public Phase {
|
|||
C->_latest_stage_start_counter.stamp();
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void igv_print_method_to_file(const char* phase_name = "Debug", bool append = false);
|
||||
void igv_print_method_to_network(const char* phase_name = "Debug");
|
||||
static IdealGraphPrinter* debug_file_printer() { return _debug_file_printer; }
|
||||
static IdealGraphPrinter* debug_network_printer() { return _debug_network_printer; }
|
||||
#endif
|
||||
|
||||
void end_method(int level = 1) {
|
||||
EventCompilerPhase event;
|
||||
if (event.should_commit()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue