Skip to content
Permalink
Browse files
8265262: CITime - 'other' incorrectly calculated
Reviewed-by: thartmann, kvn
  • Loading branch information
Nils Eliasson committed May 19, 2021
1 parent 66ab6d8 commit 38d690b3c347f71b41a34b36c1a232ea766b9a64
Showing with 33 additions and 12 deletions.
  1. +5 −0 src/hotspot/share/opto/output.cpp
  2. +23 −9 src/hotspot/share/opto/phase.cpp
  3. +5 −3 src/hotspot/share/opto/phase.hpp
@@ -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 @@ class Phase : public StackObj {
_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

1 comment on commit 38d690b

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 38d690b May 19, 2021

Please sign in to comment.