Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java @ 1438:a7a0ef3c6858
Added timing printout on VM shutdown.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Mon, 25 Oct 2010 18:35:34 +0200 |
parents | 9e5e83ca2259 |
children | d0c8d3a2a7e8 |
comparison
equal
deleted
inserted
replaced
1437:9e5e83ca2259 | 1438:a7a0ef3c6858 |
---|---|
33 * Exits from the HotSpot VM into Java code. | 33 * Exits from the HotSpot VM into Java code. |
34 * | 34 * |
35 * @author Thomas Wuerthinger, Lukas Stadler | 35 * @author Thomas Wuerthinger, Lukas Stadler |
36 */ | 36 */ |
37 public class VMExitsNative implements VMExits { | 37 public class VMExitsNative implements VMExits { |
38 | |
39 public static boolean compileMethods = true; | |
38 | 40 |
39 @Override | 41 @Override |
40 public boolean setOption(String option) { | 42 public boolean setOption(String option) { |
41 if (option.length() == 0) { | 43 if (option.length() == 0) { |
42 return false; | 44 return false; |
98 return true; | 100 return true; |
99 } | 101 } |
100 | 102 |
101 @Override | 103 @Override |
102 public void compileMethod(long methodVmId, String name, int entryBCI) { | 104 public void compileMethod(long methodVmId, String name, int entryBCI) { |
105 | |
106 if (!compileMethods) { | |
107 return; | |
108 } | |
109 | |
103 try { | 110 try { |
104 Compiler compiler = Compiler.getInstance(); | 111 Compiler compiler = Compiler.getInstance(); |
105 HotSpotMethodResolved riMethod = new HotSpotMethodResolved(methodVmId, name); | 112 HotSpotMethodResolved riMethod = new HotSpotMethodResolved(methodVmId, name); |
106 CiResult result = compiler.getCompiler().compileMethod(riMethod, null); | 113 CiResult result = compiler.getCompiler().compileMethod(riMethod, null); |
107 | 114 |
116 } catch (Throwable t) { | 123 } catch (Throwable t) { |
117 StringWriter out = new StringWriter(); | 124 StringWriter out = new StringWriter(); |
118 t.printStackTrace(new PrintWriter(out)); | 125 t.printStackTrace(new PrintWriter(out)); |
119 Logger.info("Compilation interrupted:\n" + out.toString()); | 126 Logger.info("Compilation interrupted:\n" + out.toString()); |
120 } | 127 } |
128 System.gc(); | |
121 } | 129 } |
122 | 130 |
123 @Override | 131 @Override |
124 public RiMethod createRiMethodResolved(long vmId, String name) { | 132 public RiMethod createRiMethodResolved(long vmId, String name) { |
125 return new HotSpotMethodResolved(vmId, name); | 133 return new HotSpotMethodResolved(vmId, name); |