review(XS): 7058689 Tiered: Reprofiling doesn't happen in presence of level 4 OSR methods
Igor Veresov
igor.veresov at oracle.com
Thu Jun 23 17:14:16 PDT 2011
When we deopt from a C2-compiled method and request reprofiling (we're
at level 0 at this point) natually we would want to start reprofiling in
the interpreter and queue up a level 3 compile and continue profiling at
level 3 when it arrives. However, when we decide to which level to
switch we check the max comp level of the OSR versions of the method. If
a the level is 4 and there's been more than one profiled invocation we
would choose to compile at level 4. This was initroduced to avoid deopt
loops when we deopt and switch to a higher level OSR method.
So, with reprofiling we need to handle the situation differently. The
solution is to check at which level an OSR would be even possible at the
moment (by calling the transition function with a loop predicate), which
will take into account the fact the we need to reprofile and return
either level 2 or 3; and then checking what OSR methods are currently
available and taking the minimum level.
Webrev: http://cr.openjdk.java.net/~iveresov/7058689/webrev.00/
Thanks,
igor
More information about the hotspot-compiler-dev
mailing list