8265262: CITime - 'other' incorrectly calculated

Reviewed-by: thartmann, kvn
This commit is contained in:
Nils Eliasson 2021-05-19 17:51:02 +00:00
parent 66ab6d86d1
commit 38d690b3c3
3 changed files with 33 additions and 12 deletions
src/hotspot/share/opto

@ -501,6 +501,9 @@ void PhaseOutput::compute_loop_first_inst_sizes() {
// The architecture description provides short branch variants for some long
// branch instructions. Replace eligible long branches with short branches.
void PhaseOutput::shorten_branches(uint* blk_starts) {
Compile::TracePhase tp("shorten branches", &timers[_t_shortenBranches]);
// Compute size of each block, method size, and relocation information size
uint nblocks = C->cfg()->number_of_blocks();
@ -1360,6 +1363,8 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
// Compute the size of first NumberOfLoopInstrToAlign instructions at head
// of a loop. It is used to determine the padding for loop alignment.
Compile::TracePhase tp("fill buffer", &timers[_t_fillBuffer]);
compute_loop_first_inst_sizes();
// Create oopmap set.

@ -64,24 +64,22 @@ void Phase::print_timers() {
{
tty->print_cr (" Incremental Inline: %7.3f s", timers[_t_incrInline].seconds());
tty->print_cr (" IdealLoop: %7.3f s", timers[_t_incrInline_ideal].seconds());
tty->print_cr (" IGVN: %7.3f s", timers[_t_incrInline_igvn].seconds());
tty->print_cr (" Inline: %7.3f s", timers[_t_incrInline_inline].seconds());
tty->print_cr (" Prune Useless: %7.3f s", timers[_t_incrInline_pru].seconds());
tty->print_cr (" (IGVN: %7.3f s)", timers[_t_incrInline_igvn].seconds());
tty->print_cr (" (Inline: %7.3f s)", timers[_t_incrInline_inline].seconds());
tty->print_cr (" (Prune Useless: %7.3f s)", timers[_t_incrInline_pru].seconds());
double other = timers[_t_incrInline].seconds() -
(timers[_t_incrInline_ideal].seconds() +
timers[_t_incrInline_igvn].seconds() +
timers[_t_incrInline_inline].seconds() +
timers[_t_incrInline_pru].seconds());
(timers[_t_incrInline_ideal].seconds());
if (other > 0) {
tty->print_cr(" Other: %7.3f s", other);
}
}
tty->print_cr (" Renumber Live: %7.3f s", timers[_t_renumberLive].seconds());
tty->print_cr (" Vector: %7.3f s", timers[_t_vector].seconds());
tty->print_cr (" Box elimination: %7.3f s", timers[_t_vector_elimination].seconds());
tty->print_cr (" IGVN: %7.3f s", timers[_t_vector_igvn].seconds());
tty->print_cr (" Prune Useless: %7.3f s", timers[_t_vector_pru].seconds());
tty->print_cr (" Renumber Live: %7.3f s", timers[_t_renumberLive].seconds());
tty->print_cr (" IdealLoop: %7.3f s", timers[_t_idealLoop].seconds());
tty->print_cr (" IdealLoop Verify: %7.3f s", timers[_t_idealLoopVerify].seconds());
tty->print_cr (" Cond Const Prop: %7.3f s", timers[_t_ccp].seconds());
@ -94,6 +92,7 @@ void Phase::print_timers() {
(timers[_t_escapeAnalysis].seconds() +
timers[_t_iterGVN].seconds() +
timers[_t_incrInline].seconds() +
timers[_t_vector].seconds() +
timers[_t_renumberLive].seconds() +
timers[_t_idealLoop].seconds() +
timers[_t_idealLoopVerify].seconds() +
@ -159,8 +158,23 @@ void Phase::print_timers() {
}
tty->print_cr (" Code Emission: %7.3f s", timers[_t_output].seconds());
tty->print_cr (" Insn Scheduling: %7.3f s", timers[_t_instrSched].seconds());
tty->print_cr (" Shorten branches: %7.3f s", timers[_t_shortenBranches].seconds());
tty->print_cr (" Build OOP maps: %7.3f s", timers[_t_buildOopMaps].seconds());
tty->print_cr (" Code Installation: %7.3f s", timers[_t_registerMethod].seconds());
tty->print_cr (" Fill buffer: %7.3f s", timers[_t_fillBuffer].seconds());
tty->print_cr (" Code Installation: %7.3f s", timers[_t_registerMethod].seconds());
{
double other = timers[_t_output].seconds() -
(timers[_t_instrSched].seconds() +
timers[_t_shortenBranches].seconds() +
timers[_t_buildOopMaps].seconds() +
timers[_t_fillBuffer].seconds() +
timers[_t_registerMethod].seconds());
if (other > 0) {
tty->print_cr(" Other: %7.3f s", other);
}
}
if( timers[_t_temporaryTimer1].seconds() > 0 ) {
tty->cr();

@ -111,9 +111,11 @@ public:
_t_peephole,
_t_postalloc_expand,
_t_output,
_t_instrSched,
_t_buildOopMaps,
_t_registerMethod,
_t_instrSched,
_t_shortenBranches,
_t_buildOopMaps,
_t_fillBuffer,
_t_registerMethod,
_t_temporaryTimer1,
_t_temporaryTimer2,
max_phase_timers