JDK-6510732 : Compute consistent block frequencies
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-01-08
  • Updated: 2013-11-01
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u10Fixed 7Fixed hs11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The function PhaseCFG::Estimate_Block_Frequency computes blocks frequencies based on IfNode (and other) probabilities.  Currenntly, the function stops after two passes, and allows inconsistencies in loops of nesting depths of greater than one, among other places.

Both GCM and Block:is_uncommon() rely on the relative frequencies of blocks in order to make cost/benefit choices in their respective optimizations.

This bug calls for consistency in the estimated frequencies, such that the relative frequencies between two blocks be sane, e.g., frequencies inside a loop be greater than that of the loop head.

Comments
EVALUATION Revise Estimate_Block_Frequency to leverage a loop tree to compute estimated frequencies. In its new form, the estimatation function first builds a loop tree. Second, The loop depth is then computed for each loop in the tree. Third, in a bottom up traversal of the tree, compute the frequency of each block in a loop, relative to a single loop entry. Finally, walk the loop tree in a top down fashion, adjusting the frequencies of each loop/block to be relative to a single method entry.
12-07-2007

SUGGESTED FIX See PRT webrev: http://prt-web.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/2007/20070712074224.rasbold.c2_baseline0/workspace/webrevs/webrev-2007.07.12/index.html
12-07-2007