Skip to content

Commit d659727

Browse files
committed
style fixes
1 parent 311d600 commit d659727

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/ReportHotCodePhase.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
* representation (IR).
6060
* <p>
6161
* This phase traverses all sections of the code, sorts and identifies the hottest regions of the IR
62-
* - typically loops or frequently executed blocks - wand generates a report highlighting any known
62+
* - typically loops or frequently executed blocks - and generates a report highlighting any known
6363
* performance-critical observations related to those regions (if any are present).
6464
* </p>
6565
* <p>
6666
* The resulting report can be used to guide further performance analysis or optimization efforts.
6767
* </p>
68-
*
68+
*
6969
* The phase is written in an agnostic way so it can be applied at any point in time in the
7070
* compilation pipeline.
7171
*/
@@ -77,7 +77,7 @@ public static class Options {
7777
public static final OptionKey<Boolean> ReportHotCodePartsToIGV = new OptionKey<>(false);
7878
@Option(help = "Specifies the debug level for dumping hottest code parts to the Ideal Graph Visualizer (IGV).", type = OptionType.Debug)
7979
public static final OptionKey<Integer> ReportHotCodIGVLevel = new OptionKey<>(1);
80-
@Option(help = "", type = OptionType.Debug)
80+
@Option(help = "Specifies the minimum relative frequency for reporting hot code regions.", type = OptionType.Debug)
8181
public static final OptionKey<Double> MinimalFrequencyToReport = new OptionKey<>(1D);
8282
//@formatter:on
8383
}
@@ -206,17 +206,15 @@ protected void run(StructuredGraph graph, C c) {
206206
// report the 3 hottest blocks and the 3 hottest loops and 3 hottest loops by local loop
207207
// frequency
208208
final List<HIRBlock> hottestBlocks = new ArrayList<>();
209-
final List<Loop> hottestLocalLoops = new ArrayList<>();
210-
final List<Loop> hottestGlobalLoops = new ArrayList<>();
211209

212210
Collections.addAll(hottestBlocks, cfg.reversePostOrder());
213211
hottestBlocks.sort((x, y) -> Double.compare(y.getRelativeFrequency(), x.getRelativeFrequency()));
214212

215213
ld.detectCountedLoops();
216-
hottestLocalLoops.addAll(ld.loops());
214+
final List<Loop> hottestLocalLoops = new ArrayList<>(ld.loops());
217215
hottestLocalLoops.sort((x, y) -> Double.compare(y.localLoopFrequency(), x.localLoopFrequency()));
218216

219-
hottestGlobalLoops.addAll(ld.loops());
217+
final List<Loop> hottestGlobalLoops = new ArrayList<>(ld.loops());
220218
hottestGlobalLoops.sort((x, y) -> Double.compare(y.getCFGLoop().getHeader().getRelativeFrequency(), x.getCFGLoop().getHeader().getRelativeFrequency()));
221219

222220
final List<HIRBlock> hottestFirstBlocks = takeUntil(hottestBlocks, REPORT_HOT_FIRST_N);
@@ -326,7 +324,7 @@ private static void reportMemoryKillANYInLoop(Loop l, Node inside, ControlFlowGr
326324
SingleMemoryKill sk = MemoryKill.asSingleMemoryKill(inside);
327325
if (sk.getKilledLocationIdentity().isAny()) {
328326
if (inside instanceof FixedNode) {
329-
// else we dont have a cfg position
327+
// else we don't have a cfg position
330328
warn("Node %s kills any and has relative f=%s in loop %s %n\tPotential Action Item: Determine if operation is required and replace with less intrusive memory effect if possible.%n",
331329
inside, cfg.blockFor(inside).getRelativeFrequency(), l);
332330
} else {

0 commit comments

Comments
 (0)