Mercurial > hg > truffle
annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java @ 11418:8933659076d3
remove obsolete option SlowQueueCutoff
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 21 Aug 2013 15:31:10 +0200 |
parents | 03fb03763b63 |
children | ca53d08b8ef9 |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
4313
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
24 package com.oracle.graal.hotspot.bridge; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
26 import static com.oracle.graal.compiler.GraalDebugConfig.*; |
7384
d0fbdf2f7a0e
added com.sun.crypto.provider.CipherBlockChaining intrinsifications
Doug Simon <doug.simon@oracle.com>
parents:
7373
diff
changeset
|
27 import static com.oracle.graal.graph.UnsafeAccess.*; |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
28 import static com.oracle.graal.hotspot.CompilationTask.*; |
9289
261a43921c5e
rename: HotSpotGraalRuntime.getInstance() -> graalRuntime()
Doug Simon <doug.simon@oracle.com>
parents:
9187
diff
changeset
|
29 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*; |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
30 import static com.oracle.graal.java.GraphBuilderPhase.*; |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9863
diff
changeset
|
31 import static com.oracle.graal.phases.GraalOptions.*; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
32 |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
33 import java.io.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 import java.lang.reflect.*; |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
35 import java.util.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 import java.util.concurrent.*; |
5176
af59b4dfc9e4
compilation queue changes:
Lukas Stadler <lukas.stadler@jku.at>
parents:
5164
diff
changeset
|
37 import java.util.concurrent.atomic.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 |
5507
dc71b06d09f8
Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5503
diff
changeset
|
39 import com.oracle.graal.api.meta.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
40 import com.oracle.graal.debug.*; |
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
41 import com.oracle.graal.debug.internal.*; |
9032
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
42 import com.oracle.graal.graph.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
43 import com.oracle.graal.hotspot.*; |
7786
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
44 import com.oracle.graal.hotspot.debug.*; |
5548
8872bc0eebdf
Renaming hotspot.ri => hotspot.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5547
diff
changeset
|
45 import com.oracle.graal.hotspot.meta.*; |
6677
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
46 import com.oracle.graal.hotspot.phases.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
47 import com.oracle.graal.java.*; |
6677
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
48 import com.oracle.graal.nodes.*; |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
49 import com.oracle.graal.nodes.debug.*; |
8637
ce5750014c3d
moved Replacements and MacroSubstitution from the graal.api.replacements project to graal.nodes project and reversed the dependency between these two projects (the latter now/again depends on the former)
Doug Simon <doug.simon@oracle.com>
parents:
8627
diff
changeset
|
50 import com.oracle.graal.nodes.spi.*; |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
51 import com.oracle.graal.options.*; |
6525
2c913b643422
rename packages in graal.phases to match project name
Doug Simon <doug.simon@oracle.com>
parents:
6500
diff
changeset
|
52 import com.oracle.graal.phases.*; |
6677
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
53 import com.oracle.graal.phases.PhasePlan.PhasePosition; |
9699
9529ab567367
Drafted version of an inlining policy that uses the callee graph size as its metric.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
54 import com.oracle.graal.phases.common.*; |
9902
6dfd53575553
re-enabled initialization of debug environment on main thread
Doug Simon <doug.simon@oracle.com>
parents:
9864
diff
changeset
|
55 import com.oracle.graal.printer.*; |
8415
2361bf148c06
rename packages: *snippets* -> *replacements*
Doug Simon <doug.simon@oracle.com>
parents:
8410
diff
changeset
|
56 import com.oracle.graal.replacements.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 * Exits from the HotSpot VM into Java code. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 */ |
5529
d487ae06265d
Move graal.hotspot.server into its own project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5526
diff
changeset
|
61 public class VMToCompilerImpl implements VMToCompiler { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
63 //@formatter:off |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
64 @Option(help = "File to which compiler logging is sent") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
65 private static final OptionValue<String> LogFile = new OptionValue<>(null); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
66 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
67 @Option(help = "Print compilation queue activity periodically") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
68 private static final OptionValue<Boolean> PrintQueue = new OptionValue<>(false); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
69 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
70 @Option(help = "Time limit in milliseconds for bootstrap (-1 for no limit)") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
71 private static final OptionValue<Integer> TimedBootstrap = new OptionValue<>(-1); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
72 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
73 @Option(help = "Number of compilation threads to use") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
74 private static final StableOptionValue<Integer> Threads = new StableOptionValue<Integer>() { |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
75 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
76 @Override |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
77 public Integer initialValue() { |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
78 return Runtime.getRuntime().availableProcessors(); |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
79 } |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
80 }; |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
81 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
82 @Option(help = "") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
83 private static final OptionValue<Boolean> GenericDynamicCounters = new OptionValue<>(false); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
84 |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
85 @Option(help = "") |
9914
84890660eefb
cleaner implementation of stable options
Doug Simon <doug.simon@oracle.com>
parents:
9912
diff
changeset
|
86 private static final OptionValue<String> BenchmarkDynamicCounters = new OptionValue<>(null); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
87 //@formatter:on |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
88 |
5763
a3d71693e0ce
removed bytecode disassembly from CodeCacheRuntime into separate BytecodeDisassembler class
Doug Simon <doug.simon@oracle.com>
parents:
5719
diff
changeset
|
89 private final HotSpotGraalRuntime graalRuntime; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
91 public final HotSpotResolvedPrimitiveType typeBoolean; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
92 public final HotSpotResolvedPrimitiveType typeChar; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
93 public final HotSpotResolvedPrimitiveType typeFloat; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
94 public final HotSpotResolvedPrimitiveType typeDouble; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
95 public final HotSpotResolvedPrimitiveType typeByte; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
96 public final HotSpotResolvedPrimitiveType typeShort; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
97 public final HotSpotResolvedPrimitiveType typeInt; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
98 public final HotSpotResolvedPrimitiveType typeLong; |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
99 public final HotSpotResolvedPrimitiveType typeVoid; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 private ThreadPoolExecutor compileQueue; |
5176
af59b4dfc9e4
compilation queue changes:
Lukas Stadler <lukas.stadler@jku.at>
parents:
5164
diff
changeset
|
102 private AtomicInteger compileTaskIds = new AtomicInteger(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 |
6721
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
104 private volatile boolean bootstrapRunning; |
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
105 |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
106 private PrintStream log = System.out; |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
107 |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
108 private boolean quietMeterAndTime; |
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
109 |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
110 private long compilerStartTime; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
111 |
5534
e0f7a49129f2
Renamed HotSpotCompilerImpl => HotSpotGraalRuntime.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5530
diff
changeset
|
112 public VMToCompilerImpl(HotSpotGraalRuntime compiler) { |
5763
a3d71693e0ce
removed bytecode disassembly from CodeCacheRuntime into separate BytecodeDisassembler class
Doug Simon <doug.simon@oracle.com>
parents:
5719
diff
changeset
|
113 this.graalRuntime = compiler; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
115 typeBoolean = new HotSpotResolvedPrimitiveType(Kind.Boolean); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
116 typeChar = new HotSpotResolvedPrimitiveType(Kind.Char); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
117 typeFloat = new HotSpotResolvedPrimitiveType(Kind.Float); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
118 typeDouble = new HotSpotResolvedPrimitiveType(Kind.Double); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
119 typeByte = new HotSpotResolvedPrimitiveType(Kind.Byte); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
120 typeShort = new HotSpotResolvedPrimitiveType(Kind.Short); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
121 typeInt = new HotSpotResolvedPrimitiveType(Kind.Int); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
122 typeLong = new HotSpotResolvedPrimitiveType(Kind.Long); |
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
123 typeVoid = new HotSpotResolvedPrimitiveType(Kind.Void); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
126 private static void initMirror(HotSpotResolvedPrimitiveType type, long offset) { |
7053
014727292ae0
removed more usages of ResolvedJavaType.toJava()
Doug Simon <doug.simon@oracle.com>
parents:
7034
diff
changeset
|
127 Class<?> mirror = type.mirror(); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
128 unsafe.putObject(mirror, offset, type); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
129 assert unsafe.getObject(mirror, offset) == type; |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
130 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
131 |
9728
2dc020b33a6e
set bootstrapRunning flag earlier (in VMToCompiler.startCompiler)
Lukas Stadler <lukas.stadler@jku.at>
parents:
9699
diff
changeset
|
132 public void startCompiler(boolean bootstrapEnabled) throws Throwable { |
2dc020b33a6e
set bootstrapRunning flag earlier (in VMToCompiler.startCompiler)
Lukas Stadler <lukas.stadler@jku.at>
parents:
9699
diff
changeset
|
133 |
2dc020b33a6e
set bootstrapRunning flag earlier (in VMToCompiler.startCompiler)
Lukas Stadler <lukas.stadler@jku.at>
parents:
9699
diff
changeset
|
134 bootstrapRunning = bootstrapEnabled; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
135 |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
136 HotSpotVMConfig config = graalRuntime.getConfig(); |
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
137 long offset = config.graalMirrorInClassOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
138 initMirror(typeBoolean, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
139 initMirror(typeChar, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
140 initMirror(typeFloat, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
141 initMirror(typeDouble, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
142 initMirror(typeByte, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
143 initMirror(typeShort, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
144 initMirror(typeInt, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
145 initMirror(typeLong, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
146 initMirror(typeVoid, offset); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
147 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
148 if (LogFile.getValue() != null) { |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
149 try { |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
150 final boolean enableAutoflush = true; |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
151 log = new PrintStream(new FileOutputStream(LogFile.getValue()), enableAutoflush); |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
152 } catch (FileNotFoundException e) { |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
153 throw new RuntimeException("couldn't open log file: " + LogFile.getValue(), e); |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
154 } |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
155 } |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
156 |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
157 TTY.initialize(log); |
5164
56909bcec047
added check for use of MethodFilter option without use of Log, Dump, Meter or Time options
Doug Simon <doug.simon@oracle.com>
parents:
5138
diff
changeset
|
158 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
159 if (Log.getValue() == null && Meter.getValue() == null && Time.getValue() == null && Dump.getValue() == null) { |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
160 if (MethodFilter.getValue() != null) { |
5164
56909bcec047
added check for use of MethodFilter option without use of Log, Dump, Meter or Time options
Doug Simon <doug.simon@oracle.com>
parents:
5138
diff
changeset
|
161 TTY.println("WARNING: Ignoring MethodFilter option since Log, Meter, Time and Dump options are all null"); |
56909bcec047
added check for use of MethodFilter option without use of Log, Dump, Meter or Time options
Doug Simon <doug.simon@oracle.com>
parents:
5138
diff
changeset
|
162 } |
56909bcec047
added check for use of MethodFilter option without use of Log, Dump, Meter or Time options
Doug Simon <doug.simon@oracle.com>
parents:
5138
diff
changeset
|
163 } |
56909bcec047
added check for use of MethodFilter option without use of Log, Dump, Meter or Time options
Doug Simon <doug.simon@oracle.com>
parents:
5138
diff
changeset
|
164 |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
165 if (config.ciTime) { |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
166 quietMeterAndTime = (Meter.getValue() == null && Time.getValue() == null); |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
167 DebugEnabled.setValue(true); |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
168 Meter.setValue(""); |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
169 Time.setValue(""); |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
170 } |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
171 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
172 if (DebugEnabled.getValue()) { |
9902
6dfd53575553
re-enabled initialization of debug environment on main thread
Doug Simon <doug.simon@oracle.com>
parents:
9864
diff
changeset
|
173 DebugEnvironment.initialize(log); |
11369
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
174 |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
175 String summary = DebugValueSummary.getValue(); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
176 if (summary != null) { |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
177 switch (summary) { |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
178 case "Name": |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
179 case "Partial": |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
180 case "Complete": |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
181 case "Thread": |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
182 break; |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
183 default: |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
184 throw new GraalInternalError("Unsupported value for DebugSummaryValue: %s", summary); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
185 } |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
186 } |
4558
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
187 } |
7346
5ce0743ba6d8
Small fix that prevented debug mode to work with DebugSnippets set to false.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7318
diff
changeset
|
188 |
9986
4f542ceb5fed
added VerifyHotSpotOptionsPhase to ensure that global state is not initialized from options prior to command line parsing
Doug Simon <doug.simon@oracle.com>
parents:
9969
diff
changeset
|
189 assert VerifyHotSpotOptionsPhase.checkOptions(); |
4f542ceb5fed
added VerifyHotSpotOptionsPhase to ensure that global state is not initialized from options prior to command line parsing
Doug Simon <doug.simon@oracle.com>
parents:
9969
diff
changeset
|
190 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
191 // Install intrinsics. |
7835
72971ec0d7ae
Remove usage of GraalCompiler.target field.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7786
diff
changeset
|
192 final HotSpotRuntime runtime = graalRuntime.getCapability(HotSpotRuntime.class); |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8560
diff
changeset
|
193 final Replacements replacements = graalRuntime.getCapability(Replacements.class); |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9863
diff
changeset
|
194 if (Intrinsify.getValue()) { |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8560
diff
changeset
|
195 Debug.scope("RegisterReplacements", new Object[]{new DebugDumpScope("RegisterReplacements")}, new Runnable() { |
5134
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
196 |
4558
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
197 @Override |
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
198 public void run() { |
9015
92d2bedb5dfc
Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents:
8959
diff
changeset
|
199 ServiceLoader<ReplacementsProvider> serviceLoader = ServiceLoader.loadInstalled(ReplacementsProvider.class); |
92d2bedb5dfc
Change of Snippet template and instantiation process
Christian Wimmer <christian.wimmer@oracle.com>
parents:
8959
diff
changeset
|
200 for (ReplacementsProvider provider : serviceLoader) { |
9187
cd2600a2336e
Store snippet templates in Replacements object.
Roland Schatz <roland.schatz@oracle.com>
parents:
9184
diff
changeset
|
201 provider.registerReplacements(runtime, replacements, runtime.getTarget()); |
8458
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
8432
diff
changeset
|
202 } |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8560
diff
changeset
|
203 runtime.registerReplacements(replacements); |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9863
diff
changeset
|
204 if (BootstrapReplacements.getValue()) { |
8912
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
205 for (ResolvedJavaMethod method : replacements.getAllReplacements()) { |
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
206 replacements.getMacroSubstitution(method); |
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
207 replacements.getMethodSubstitution(method); |
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
208 replacements.getSnippet(method); |
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
209 } |
9631f95971a3
new GraalOption.BootstrapReplacements for debugging purposes
Lukas Stadler <lukas.stadler@jku.at>
parents:
8627
diff
changeset
|
210 } |
4558
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
211 } |
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
212 }); |
3706975946e4
Make graph dumping a bit more robust when there is no method, enable debug in the startCompiler method, add context and scope for snippets installation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4479
diff
changeset
|
213 |
4197
b765172082ac
Move HotSpotMethod* and HotSpotType* implementations into ri subpackage.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4171
diff
changeset
|
214 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
215 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
216 // Create compilation queue. |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
217 compileQueue = new ThreadPoolExecutor(Threads.getValue(), Threads.getValue(), 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), CompilerThread.FACTORY); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
218 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
219 // Create queue status printing thread. |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
220 if (PrintQueue.getValue()) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
221 Thread t = new Thread() { |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
222 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
223 @Override |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
224 public void run() { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
225 while (true) { |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
226 TTY.println(compileQueue.toString()); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
227 try { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
228 Thread.sleep(1000); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
229 } catch (InterruptedException e) { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
230 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
231 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
232 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
233 }; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
234 t.setDaemon(true); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
235 t.start(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
236 } |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
237 |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
238 if (BenchmarkDynamicCounters.getValue() != null) { |
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
239 String[] arguments = BenchmarkDynamicCounters.getValue().split(","); |
9032
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
240 if (arguments.length == 0 || (arguments.length % 3) != 0) { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
241 throw new GraalInternalError("invalid arguments to BenchmarkDynamicCounters: (err|out),start,end,(err|out),start,end,... (~ matches multiple digits)"); |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
242 } |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
243 for (int i = 0; i < arguments.length; i += 3) { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
244 if (arguments[i].equals("err")) { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
245 System.setErr(new PrintStream(new BenchmarkCountersOutputStream(System.err, arguments[i + 1], arguments[i + 2]))); |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
246 } else if (arguments[i].equals("out")) { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
247 System.setOut(new PrintStream(new BenchmarkCountersOutputStream(System.out, arguments[i + 1], arguments[i + 2]))); |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
248 } else { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
249 throw new GraalInternalError("invalid arguments to BenchmarkDynamicCounters: err|out"); |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
250 } |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
251 // dacapo: "err, starting =====, PASSED in " |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
252 // specjvm2008: "out,Iteration ~ (~s) begins: ,Iteration ~ (~s) ends: " |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
253 } |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
254 DynamicCounterNode.excludedClassPrefix = "Lcom/oracle/graal/"; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
255 DynamicCounterNode.enabled = true; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
256 } |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
257 if (GenericDynamicCounters.getValue()) { |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
258 DynamicCounterNode.enabled = true; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
259 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
260 compilerStartTime = System.nanoTime(); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
261 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
262 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
263 private final class BenchmarkCountersOutputStream extends CallbackOutputStream { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
264 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
265 private long startTime; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
266 private boolean waitingForEnd; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
267 |
9032
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
268 private BenchmarkCountersOutputStream(PrintStream delegate, String start, String end) { |
0279403fc3c9
make GraalOptions.BenchmarkDynamicCounters configurable
Lukas Stadler <lukas.stadler@jku.at>
parents:
8959
diff
changeset
|
269 super(delegate, new String[]{start, end, "\n"}); |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
270 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
271 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
272 @Override |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
273 protected void patternFound(int index) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
274 switch (index) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
275 case 0: |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
276 startTime = System.nanoTime(); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
277 DynamicCounterNode.clear(); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
278 break; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
279 case 1: |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
280 waitingForEnd = true; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
281 break; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
282 case 2: |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
283 if (waitingForEnd) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
284 waitingForEnd = false; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
285 DynamicCounterNode.dump(delegate, (System.nanoTime() - startTime) / 1000000000d); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
286 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
287 break; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
288 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
289 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
290 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
291 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
292 public abstract static class CallbackOutputStream extends OutputStream { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
293 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
294 protected final PrintStream delegate; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
295 private final byte[][] patterns; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
296 private final int[] positions; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
297 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
298 public CallbackOutputStream(PrintStream delegate, String... patterns) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
299 this.delegate = delegate; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
300 this.positions = new int[patterns.length]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
301 this.patterns = new byte[patterns.length][]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
302 for (int i = 0; i < patterns.length; i++) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
303 this.patterns[i] = patterns[i].getBytes(); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
304 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
305 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
306 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
307 protected abstract void patternFound(int index); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
308 |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
309 @Override |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
310 public void write(int b) throws IOException { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
311 try { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
312 delegate.write(b); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
313 for (int i = 0; i < patterns.length; i++) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
314 int j = positions[i]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
315 byte[] cs = patterns[i]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
316 byte patternChar = cs[j]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
317 if (patternChar == '~' && Character.isDigit(b)) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
318 // nothing to do... |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
319 } else { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
320 if (patternChar == '~') { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
321 patternChar = cs[++positions[i]]; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
322 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
323 if (b == patternChar) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
324 positions[i]++; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
325 } else { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
326 positions[i] = 0; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
327 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
328 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
329 if (positions[i] == patterns[i].length) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
330 positions[i] = 0; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
331 patternFound(i); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
332 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
333 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
334 } catch (RuntimeException e) { |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
335 e.printStackTrace(delegate); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
336 throw e; |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
337 } |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
338 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
339 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
340 |
4313
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
341 /** |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
342 * Take action related to entering a new execution phase. |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
343 * |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
344 * @param phase the execution phase being entered |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
345 */ |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
346 protected void phaseTransition(String phase) { |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
347 CompilationStatistics.clear(phase); |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
348 if (graalRuntime.getConfig().ciTime) { |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
349 parsedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, parsedBytecodesPerSecond, BytecodesParsed, CompilationTime, TimeUnit.SECONDS); |
9699
9529ab567367
Drafted version of an inlining policy that uses the callee graph size as its metric.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9289
diff
changeset
|
350 inlinedBytecodesPerSecond = MetricRateInPhase.snapshot(phase, inlinedBytecodesPerSecond, InliningUtil.InlinedBytecodes, CompilationTime, TimeUnit.SECONDS); |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
351 } |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
352 } |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
353 |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
354 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7510
diff
changeset
|
355 * This method is the first method compiled during bootstrapping. Put any code in there that |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7510
diff
changeset
|
356 * warms up compiler paths that are otherwise not exercised during bootstrapping and lead to |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7510
diff
changeset
|
357 * later deoptimization when application code is compiled. |
4313
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
358 */ |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
359 @SuppressWarnings("unused") |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
360 @Deprecated |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
361 private synchronized void compileWarmup() { |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
362 // Method is synchronized to exercise the synchronization code in the compiler. |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
363 } |
79af35bd9fd7
Bootstrap with a syncrhonized method to avoid later deoptimization when the first real synchronized method is compiled.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4265
diff
changeset
|
364 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
365 public void bootstrap() throws Throwable { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
366 TTY.print("Bootstrapping Graal"); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
367 TTY.flush(); |
4168
0bc4815d2069
Start bootstrapping in compiler threads
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
4142
diff
changeset
|
368 long startTime = System.currentTimeMillis(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
369 |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
370 boolean firstRun = true; |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
371 do { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
372 // Initialize compile queue with a selected set of methods. |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
373 Class<Object> objectKlass = Object.class; |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
374 if (firstRun) { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
375 enqueue(getClass().getDeclaredMethod("compileWarmup")); |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
376 enqueue(objectKlass.getDeclaredMethod("equals", Object.class)); |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
377 enqueue(objectKlass.getDeclaredMethod("toString")); |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
378 firstRun = false; |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
379 } else { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
380 for (int i = 0; i < 100; i++) { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
381 enqueue(getClass().getDeclaredMethod("bootstrap")); |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
382 } |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
383 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
384 |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
385 // Compile until the queue is empty. |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
386 int z = 0; |
5263
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
387 while (true) { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
388 try { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
389 assert !CompilationTask.withinEnqueue.get(); |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
390 CompilationTask.withinEnqueue.set(Boolean.TRUE); |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
391 if (compileQueue.getCompletedTaskCount() >= Math.max(3, compileQueue.getTaskCount())) { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
392 break; |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
393 } |
5263
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
394 } finally { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
395 CompilationTask.withinEnqueue.set(Boolean.FALSE); |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
396 } |
5263
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
397 |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
398 Thread.sleep(100); |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
399 while (z < compileQueue.getCompletedTaskCount() / 100) { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
400 ++z; |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
401 TTY.print("."); |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
402 TTY.flush(); |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
403 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
404 } |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
405 } while ((System.currentTimeMillis() - startTime) <= TimedBootstrap.getValue()); |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
406 |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
407 phaseTransition("bootstrap"); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
408 |
6721
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
409 bootstrapRunning = false; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
410 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
411 TTY.println(" in %d ms", System.currentTimeMillis() - startTime); |
5763
a3d71693e0ce
removed bytecode disassembly from CodeCacheRuntime into separate BytecodeDisassembler class
Doug Simon <doug.simon@oracle.com>
parents:
5719
diff
changeset
|
412 if (graalRuntime.getCache() != null) { |
a3d71693e0ce
removed bytecode disassembly from CodeCacheRuntime into separate BytecodeDisassembler class
Doug Simon <doug.simon@oracle.com>
parents:
5719
diff
changeset
|
413 graalRuntime.getCache().clear(); |
5177
a26b6248d398
added graph caching (-G:+CacheGraphs)
Lukas Stadler <lukas.stadler@jku.at>
parents:
5176
diff
changeset
|
414 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
415 System.gc(); |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
416 phaseTransition("bootstrap2"); |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
417 |
9864
063a712fe8d8
converted remaining options in GraalOptions to new system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9863
diff
changeset
|
418 if (CompileTheWorld.getValue() != null) { |
9108 | 419 new CompileTheWorld().compile(); |
420 System.exit(0); | |
421 } | |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
422 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
423 |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
424 private MetricRateInPhase parsedBytecodesPerSecond; |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
425 private MetricRateInPhase inlinedBytecodesPerSecond; |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
426 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
427 private void enqueue(Method m) throws Throwable { |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6526
diff
changeset
|
428 JavaMethod javaMethod = graalRuntime.getRuntime().lookupJavaMethod(m); |
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6526
diff
changeset
|
429 assert !Modifier.isAbstract(((HotSpotResolvedJavaMethod) javaMethod).getModifiers()) && !Modifier.isNative(((HotSpotResolvedJavaMethod) javaMethod).getModifiers()) : javaMethod; |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
430 compileMethod((HotSpotResolvedJavaMethod) javaMethod, StructuredGraph.INVOCATION_ENTRY_BCI, false); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
431 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
432 |
5367
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
433 private static void shutdownCompileQueue(ThreadPoolExecutor queue) throws InterruptedException { |
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
434 if (queue != null) { |
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
435 queue.shutdown(); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
436 if (Debug.isEnabled() && Dump.getValue() != null) { |
5661
28dea025b221
reduced shutdown pause when -G:Dump is used from 5 seconds to 2
Doug Simon <doug.simon@oracle.com>
parents:
5585
diff
changeset
|
437 // Wait 2 seconds to flush out all graph dumps that may be of interest |
28dea025b221
reduced shutdown pause when -G:Dump is used from 5 seconds to 2
Doug Simon <doug.simon@oracle.com>
parents:
5585
diff
changeset
|
438 queue.awaitTermination(2, TimeUnit.SECONDS); |
5367
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
439 } |
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
440 } |
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
441 } |
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
442 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
443 public void shutdownCompiler() throws Throwable { |
5263
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
444 try { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
445 assert !CompilationTask.withinEnqueue.get(); |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
446 CompilationTask.withinEnqueue.set(Boolean.TRUE); |
5367
7cf71c7961c6
if -G:Dump option is used, the compiler queues are given 5 seconds to finish any pending tasks (including graph dumping) before the VM exits
Doug Simon <doug.simon@oracle.com>
parents:
5361
diff
changeset
|
447 shutdownCompileQueue(compileQueue); |
5263
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
448 } finally { |
d87155082c4d
guard all compilation queue accesses, to avoid deadlocks
Lukas Stadler <lukas.stadler@jku.at>
parents:
5183
diff
changeset
|
449 CompilationTask.withinEnqueue.set(Boolean.FALSE); |
5176
af59b4dfc9e4
compilation queue changes:
Lukas Stadler <lukas.stadler@jku.at>
parents:
5164
diff
changeset
|
450 } |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
451 |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
452 if (Debug.isEnabled() && !quietMeterAndTime) { |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
453 List<DebugValueMap> topLevelMaps = DebugValueMap.getTopLevelMaps(); |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
454 List<DebugValue> debugValues = KeyRegistry.getDebugValues(); |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
455 if (debugValues.size() > 0) { |
5386
19e5dc8d0891
alphabetically sort debug values for Metric and Time
Lukas Stadler <lukas.stadler@jku.at>
parents:
5367
diff
changeset
|
456 ArrayList<DebugValue> sortedValues = new ArrayList<>(debugValues); |
7551
68a59067974a
made DebugValue implement Comparable and removed comparator that sorted the "Runs" metric before all others
Doug Simon <doug.simon@oracle.com>
parents:
7384
diff
changeset
|
457 Collections.sort(sortedValues); |
5386
19e5dc8d0891
alphabetically sort debug values for Metric and Time
Lukas Stadler <lukas.stadler@jku.at>
parents:
5367
diff
changeset
|
458 |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
459 String summary = DebugValueSummary.getValue(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
460 if (summary == null) { |
11369
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
461 summary = "Complete"; |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
462 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
463 switch (summary) { |
11369
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
464 case "Name": |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
465 printSummary(topLevelMaps, sortedValues); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
466 break; |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
467 case "Partial": { |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
468 DebugValueMap globalMap = new DebugValueMap("Global"); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
469 for (DebugValueMap map : topLevelMaps) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
470 flattenChildren(map, globalMap); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
471 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
472 globalMap.normalize(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
473 printMap(new DebugValueScope(null, globalMap), sortedValues); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
474 break; |
4553
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
475 } |
11369
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
476 case "Complete": { |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
477 DebugValueMap globalMap = new DebugValueMap("Global"); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
478 for (DebugValueMap map : topLevelMaps) { |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
479 globalMap.addChild(map); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
480 } |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
481 globalMap.group(); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
482 globalMap.normalize(); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
483 printMap(new DebugValueScope(null, globalMap), sortedValues); |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
484 break; |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
485 } |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
486 case "Thread": |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
487 for (DebugValueMap map : topLevelMaps) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
488 TTY.println("Showing the results for thread: " + map.getName()); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
489 map.group(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
490 map.normalize(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
491 printMap(new DebugValueScope(null, map), sortedValues); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
492 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
493 break; |
11369
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
494 default: |
03fb03763b63
small fixes for handling of -G:DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
11366
diff
changeset
|
495 throw new GraalInternalError("Unknown summary type: %s", summary); |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
496 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
497 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
498 } |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
499 phaseTransition("final"); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
500 |
7569
7cae58134ff7
collection of Graal compilation speed metrics is now triggered by -XX:+CITime instead of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7560
diff
changeset
|
501 if (graalRuntime.getConfig().ciTime) { |
8959
7fee8bd5d2bd
Remove some System.(out|err).print...
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8937
diff
changeset
|
502 parsedBytecodesPerSecond.printAll("ParsedBytecodesPerSecond", System.out); |
7fee8bd5d2bd
Remove some System.(out|err).print...
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
8937
diff
changeset
|
503 inlinedBytecodesPerSecond.printAll("InlinedBytecodesPerSecond", System.out); |
7560
0b68e6426b48
fixed bug in implementation of -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7558
diff
changeset
|
504 } |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
505 |
5769
8635406a0c33
factored counter functionality out of CheckcastSnippets in SnippetCounter for use by other snippets
Doug Simon <doug.simon@oracle.com>
parents:
5763
diff
changeset
|
506 SnippetCounter.printGroups(TTY.out().out()); |
9849
e876c2a6954f
extensible option system (GRAAL-27)
Doug Simon <doug.simon@oracle.com>
parents:
9728
diff
changeset
|
507 if (GenericDynamicCounters.getValue()) { |
8547
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
508 DynamicCounterNode.dump(System.out, (System.nanoTime() - compilerStartTime) / 1000000000d); |
ca29d921a53a
GraalOptions.BenchmarkDynamicCounters to get counters for dacapo/specjvm2008 run
Lukas Stadler <lukas.stadler@jku.at>
parents:
8458
diff
changeset
|
509 } |
4563
b27666ff9bd6
added compilation time statistics to product mode
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4560
diff
changeset
|
510 } |
b27666ff9bd6
added compilation time statistics to product mode
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4560
diff
changeset
|
511 |
5134
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
512 private void flattenChildren(DebugValueMap map, DebugValueMap globalMap) { |
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
513 globalMap.addChild(map); |
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
514 for (DebugValueMap child : map.getChildren()) { |
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
515 flattenChildren(child, globalMap); |
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
516 } |
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
517 map.clearChildren(); |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
518 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
519 |
4553
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
520 private static void printSummary(List<DebugValueMap> topLevelMaps, List<DebugValue> debugValues) { |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
521 DebugValueMap result = new DebugValueMap("Summary"); |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
522 for (int i = debugValues.size() - 1; i >= 0; i--) { |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
523 DebugValue debugValue = debugValues.get(i); |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
524 int index = debugValue.getIndex(); |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
525 long total = collectTotal(topLevelMaps, index); |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
526 result.setCurrentValue(index, total); |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
527 } |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
528 printMap(new DebugValueScope(null, result), debugValues); |
4553
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
529 } |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
530 |
7558
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
531 static long collectTotal(DebugValue value) { |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
532 List<DebugValueMap> maps = DebugValueMap.getTopLevelMaps(); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
533 long total = 0; |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
534 for (int i = 0; i < maps.size(); i++) { |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
535 DebugValueMap map = maps.get(i); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
536 int index = value.getIndex(); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
537 total += map.getCurrentValue(index); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
538 total += collectTotal(map.getChildren(), index); |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
539 } |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
540 return total; |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
541 } |
223f645acb9b
added compilation rate measurements on top of existing metric/timer facility - enabled with -Dgraal.benchmark.compilation=true
Doug Simon <doug.simon@oracle.com>
parents:
7552
diff
changeset
|
542 |
4553
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
543 private static long collectTotal(List<DebugValueMap> maps, int index) { |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
544 long total = 0; |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
545 for (int i = 0; i < maps.size(); i++) { |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
546 DebugValueMap map = maps.get(i); |
7247
1706be855f0e
Use ThreadMXBean to get CPU time instead of Wallclock time for Timers if possible
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7221
diff
changeset
|
547 total += map.getCurrentValue(index); |
1706be855f0e
Use ThreadMXBean to get CPU time instead of Wallclock time for Timers if possible
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7221
diff
changeset
|
548 total += collectTotal(map.getChildren(), index); |
4553
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
549 } |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
550 return total; |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
551 } |
7d0d849abf80
added option to summarize debug values
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4479
diff
changeset
|
552 |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
553 /** |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
554 * Tracks the scope when printing a {@link DebugValueMap}, allowing "empty" scopes to be |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
555 * omitted. An empty scope is one in which there are no (nested) non-zero debug values. |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
556 */ |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
557 static class DebugValueScope { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
558 |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
559 final DebugValueScope parent; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
560 final int level; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
561 final DebugValueMap map; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
562 private boolean printed; |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
563 |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
564 public DebugValueScope(DebugValueScope parent, DebugValueMap map) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
565 this.parent = parent; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
566 this.map = map; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
567 this.level = parent == null ? 0 : parent.level + 1; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
568 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
569 |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
570 public void print() { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
571 if (!printed) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
572 printed = true; |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
573 if (parent != null) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
574 parent.print(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
575 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
576 printIndent(level); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
577 TTY.println("%s", map.getName()); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
578 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
579 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
580 } |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
581 |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
582 private static void printMap(DebugValueScope scope, List<DebugValue> debugValues) { |
5386
19e5dc8d0891
alphabetically sort debug values for Metric and Time
Lukas Stadler <lukas.stadler@jku.at>
parents:
5367
diff
changeset
|
583 |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
584 for (DebugValue value : debugValues) { |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
585 long l = scope.map.getCurrentValue(value.getIndex()); |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
586 if (l != 0) { |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
587 scope.print(); |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
588 printIndent(scope.level + 1); |
5134
4eb9895d9afe
Refactoring of the debug framework. Move compiler thread implementation to its own file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5061
diff
changeset
|
589 TTY.println(value.getName() + "=" + value.toString(l)); |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
590 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
591 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
592 |
11366
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
593 for (DebugValueMap child : scope.map.getChildren()) { |
d335c16d2fe7
replaced PerThreadDebugValues, SummarizeDebugValues and SummarisePerPhase options with DebugValueSummary option
Doug Simon <doug.simon@oracle.com>
parents:
10672
diff
changeset
|
594 printMap(new DebugValueScope(scope, child), debugValues); |
4406
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
595 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
596 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
597 |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
598 private static void printIndent(int level) { |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
599 for (int i = 0; i < level; ++i) { |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
600 TTY.print(" "); |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
601 } |
961895157a38
Tentative implementation of Meter and Time.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4366
diff
changeset
|
602 TTY.print("|-> "); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
603 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
604 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
605 @Override |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
606 public void compileMethod(long metaspaceMethod, final HotSpotResolvedObjectType holder, final int entryBCI, boolean blocking) throws Throwable { |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
607 HotSpotResolvedJavaMethod method = holder.createMethod(metaspaceMethod); |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
608 compileMethod(method, entryBCI, blocking); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
609 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
610 |
7108
fa99bf3837ec
fixed some issues that precluded compilation of Graal compiler methods
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7085
diff
changeset
|
611 /** |
10076
25de9c96a032
Minor CompilationTask refactoring.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10056
diff
changeset
|
612 * Compiles a method to machine code. |
7108
fa99bf3837ec
fixed some issues that precluded compilation of Graal compiler methods
Christian Haeubl <haeubl@ssw.jku.at>
parents:
7085
diff
changeset
|
613 */ |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
614 public void compileMethod(final HotSpotResolvedJavaMethod method, final int entryBCI, boolean blocking) throws Throwable { |
6721
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
615 boolean osrCompilation = entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI; |
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
616 if (osrCompilation && bootstrapRunning) { |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7510
diff
changeset
|
617 // no OSR compilations during bootstrap - the compiler is just too slow at this point, |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7510
diff
changeset
|
618 // and we know that there are no endless loops |
10056
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9986
diff
changeset
|
619 return; |
6721
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
620 } |
98d691bc23da
make osr compilations asynchronous
Lukas Stadler <lukas.stadler@jku.at>
parents:
6682
diff
changeset
|
621 |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
622 if (CompilationTask.withinEnqueue.get()) { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
623 // This is required to avoid deadlocking a compiler thread. The issue is that a |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
624 // java.util.concurrent.BlockingQueue is used to implement the compilation worker |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
625 // queues. If a compiler thread triggers a compilation, then it may be blocked trying |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
626 // to add something to its own queue. |
10056
a323a9e20f9d
Fixed a few race conditions in the compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
9986
diff
changeset
|
627 return; |
5176
af59b4dfc9e4
compilation queue changes:
Lukas Stadler <lukas.stadler@jku.at>
parents:
5164
diff
changeset
|
628 } |
af59b4dfc9e4
compilation queue changes:
Lukas Stadler <lukas.stadler@jku.at>
parents:
5164
diff
changeset
|
629 |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
630 CompilationTask.withinEnqueue.set(Boolean.TRUE); |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
631 try { |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
632 if (method.tryToQueueForCompilation()) { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
633 assert method.isQueuedForCompilation(); |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
634 |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
635 final OptimisticOptimizations optimisticOpts = new OptimisticOptimizations(method); |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
636 int id = compileTaskIds.incrementAndGet(); |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
637 CompilationTask task = CompilationTask.create(graalRuntime, createPhasePlan(optimisticOpts, osrCompilation), optimisticOpts, method, entryBCI, id); |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
638 |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
639 if (blocking) { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
640 task.runCompilation(); |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
641 } else { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
642 try { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
643 method.setCurrentTask(task); |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
644 compileQueue.execute(task); |
10672
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
645 } catch (RejectedExecutionException e) { |
e7d07c9bb779
Removed priority compilation queue.
Christian Haeubl <haeubl@ssw.jku.at>
parents:
10076
diff
changeset
|
646 // The compile queue was already shut down. |
5183
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
647 } |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
648 } |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
649 } |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
650 } finally { |
e1e681a5558e
fix PriorityQueue, enable PriorityQueue and CacheGraphs
Lukas Stadler <lukas.stadler@jku.at>
parents:
5177
diff
changeset
|
651 CompilationTask.withinEnqueue.set(Boolean.FALSE); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
652 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
653 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
654 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
655 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
656 public JavaMethod createUnresolvedJavaMethod(String name, String signature, JavaType holder) { |
5530
9da759562a42
Remove compiler member field from HotSpot's implementation of the Ri* interfaces.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5529
diff
changeset
|
657 return new HotSpotMethodUnresolved(name, signature, holder); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
658 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
659 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
660 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
661 public JavaField createJavaField(JavaType holder, String name, JavaType type, int offset, int flags, boolean internal) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
662 if (offset != -1) { |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
663 HotSpotResolvedObjectType resolved = (HotSpotResolvedObjectType) holder; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
664 return resolved.createField(name, type, offset, flags, internal); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
665 } |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6526
diff
changeset
|
666 return new HotSpotUnresolvedField(holder, name, type); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
667 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
668 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
669 @Override |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
670 public ResolvedJavaMethod createResolvedJavaMethod(JavaType holder, long metaspaceMethod) { |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
671 HotSpotResolvedObjectType type = (HotSpotResolvedObjectType) holder; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
672 return type.createMethod(metaspaceMethod); |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
673 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
674 |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
675 @Override |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5548
diff
changeset
|
676 public ResolvedJavaType createPrimitiveJavaType(int basicType) { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
677 switch (basicType) { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
678 case 4: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
679 return typeBoolean; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
680 case 5: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
681 return typeChar; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
682 case 6: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
683 return typeFloat; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
684 case 7: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
685 return typeDouble; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
686 case 8: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
687 return typeByte; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
688 case 9: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
689 return typeShort; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
690 case 10: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
691 return typeInt; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
692 case 11: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
693 return typeLong; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
694 case 14: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
695 return typeVoid; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
696 default: |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
697 throw new IllegalArgumentException("Unknown basic type: " + basicType); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
698 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
699 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
700 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
701 @Override |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
702 public HotSpotUnresolvedJavaType createUnresolvedJavaType(String name) { |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
703 int dims = 0; |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
704 int startIndex = 0; |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
705 while (name.charAt(startIndex) == '[') { |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
706 startIndex++; |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
707 dims++; |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
708 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
709 |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
710 // Decode name if necessary. |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
711 if (name.charAt(name.length() - 1) == ';') { |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
712 assert name.charAt(startIndex) == 'L'; |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
713 return new HotSpotUnresolvedJavaType(name, name.substring(startIndex + 1, name.length() - 1), dims); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
714 } else { |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
715 return new HotSpotUnresolvedJavaType(HotSpotUnresolvedJavaType.getFullName(name, dims), name, dims); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
716 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
717 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
718 |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
719 @Override |
9126
bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents:
9108
diff
changeset
|
720 public HotSpotResolvedObjectType createResolvedJavaType(long metaspaceKlass, String name, String simpleName, Class javaMirror, int sizeOrSpecies) { |
bc26f978b0ce
HotSpotResolvedObjectType: implement hasFinalizeSubclass() correctly
Bernhard Urban <bernhard.urban@jku.at>
parents:
9108
diff
changeset
|
721 HotSpotResolvedObjectType type = new HotSpotResolvedObjectType(metaspaceKlass, name, simpleName, javaMirror, sizeOrSpecies); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
722 |
9289
261a43921c5e
rename: HotSpotGraalRuntime.getInstance() -> graalRuntime()
Doug Simon <doug.simon@oracle.com>
parents:
9187
diff
changeset
|
723 long offset = graalRuntime().getConfig().graalMirrorInClassOffset; |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
724 if (!unsafe.compareAndSwapObject(javaMirror, offset, null, type)) { |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
725 // lost the race - return the existing value instead |
7084
9ba90252ce08
HotSpotResolvedJavaType is now the HotSpot implementation of ResolvedJavaType,
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
7081
diff
changeset
|
726 type = (HotSpotResolvedObjectType) unsafe.getObject(javaMirror, offset); |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
727 } |
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6682
diff
changeset
|
728 return type; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
729 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
730 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
731 @Override |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5548
diff
changeset
|
732 public Constant createConstant(Kind kind, long value) { |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
733 if (kind == Kind.Long) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
734 return Constant.forLong(value); |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
735 } else if (kind == Kind.Int) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
736 return Constant.forInt((int) value); |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
737 } else if (kind == Kind.Short) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
738 return Constant.forShort((short) value); |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
739 } else if (kind == Kind.Char) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
740 return Constant.forChar((char) value); |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
741 } else if (kind == Kind.Byte) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
742 return Constant.forByte((byte) value); |
5540
a891c53a295b
Renaming RiKind => Kind.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5538
diff
changeset
|
743 } else if (kind == Kind.Boolean) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
744 return (value == 0) ? Constant.FALSE : Constant.TRUE; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
745 } else { |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
746 throw new IllegalArgumentException(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
747 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
748 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
749 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
750 @Override |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5548
diff
changeset
|
751 public Constant createConstantFloat(float value) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
752 return Constant.forFloat(value); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
753 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
754 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
755 @Override |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5548
diff
changeset
|
756 public Constant createConstantDouble(double value) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
757 return Constant.forDouble(value); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
758 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
759 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
760 @Override |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5548
diff
changeset
|
761 public Constant createConstantObject(Object object) { |
5538
e18ba36bfebc
Renamed RiConstant => Constant.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5534
diff
changeset
|
762 return Constant.forObject(object); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
763 } |
4420
97e0fb1f4906
Make Array copy intrinsifier active again, fix format string in canonicalizer
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4410
diff
changeset
|
764 |
7786
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
765 @Override |
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
766 public LocalImpl createLocalImpl(String name, String type, HotSpotResolvedObjectType holder, int bciStart, int bciEnd, int slot) { |
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
767 return new LocalImpl(name, type, holder, bciStart, bciEnd, slot); |
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
768 } |
8bbbde9d0a52
extended ResolvedJavaMethod API by getLocalVariableTable
Matthias Grimmer <grimmer@ssw.jku.at>
parents:
7569
diff
changeset
|
769 |
6677
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
770 public PhasePlan createPhasePlan(OptimisticOptimizations optimisticOpts, boolean onStackReplacement) { |
4420
97e0fb1f4906
Make Array copy intrinsifier active again, fix format string in canonicalizer
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4410
diff
changeset
|
771 PhasePlan phasePlan = new PhasePlan(); |
6677
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
772 phasePlan.addPhase(PhasePosition.AFTER_PARSING, new GraphBuilderPhase(graalRuntime.getRuntime(), GraphBuilderConfiguration.getDefault(), optimisticOpts)); |
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
773 if (onStackReplacement) { |
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
774 phasePlan.addPhase(PhasePosition.AFTER_PARSING, new OnStackReplacementPhase()); |
3dddb311395f
hotspot infrastructure for OnStackReplacement
Lukas Stadler <lukas.stadler@jku.at>
parents:
6539
diff
changeset
|
775 } |
4420
97e0fb1f4906
Make Array copy intrinsifier active again, fix format string in canonicalizer
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4410
diff
changeset
|
776 return phasePlan; |
97e0fb1f4906
Make Array copy intrinsifier active again, fix format string in canonicalizer
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
4410
diff
changeset
|
777 } |
5328
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
778 |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
779 @Override |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
780 public PrintStream log() { |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
781 return log; |
e4e02131c58b
log file (i.e. -G:LogFile=log.txt option) now used for TTY output as well
Doug Simon <doug.simon@oracle.com>
parents:
5323
diff
changeset
|
782 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
783 } |