equal
deleted
inserted
replaced
71 map.put("vm.rtm.cpu", vmRTMCPU()); |
71 map.put("vm.rtm.cpu", vmRTMCPU()); |
72 map.put("vm.rtm.os", vmRTMOS()); |
72 map.put("vm.rtm.os", vmRTMOS()); |
73 map.put("vm.aot", vmAOT()); |
73 map.put("vm.aot", vmAOT()); |
74 // vm.cds is true if the VM is compiled with cds support. |
74 // vm.cds is true if the VM is compiled with cds support. |
75 map.put("vm.cds", vmCDS()); |
75 map.put("vm.cds", vmCDS()); |
|
76 // vm.graal.enabled is true if Graal is used as JIT |
|
77 map.put("vm.graal.enabled", isGraalEnabled()); |
76 vmGC(map); // vm.gc.X = true/false |
78 vmGC(map); // vm.gc.X = true/false |
77 |
79 |
78 VMProps.dump(map); |
80 VMProps.dump(map); |
79 return map; |
81 return map; |
80 } |
82 } |
291 return "false"; |
293 return "false"; |
292 } |
294 } |
293 } |
295 } |
294 |
296 |
295 /** |
297 /** |
|
298 * Check if Graal is used as JIT compiler. |
|
299 * |
|
300 * @return true if Graal is used as JIT compiler. |
|
301 */ |
|
302 protected String isGraalEnabled() { |
|
303 // Graal is enabled if following conditions are true: |
|
304 // - we are not in Interpreter mode |
|
305 // - UseJVMCICompiler flag is true |
|
306 // - jvmci.Compiler variable is equal to 'graal' |
|
307 // - TieredCompilation is not used or TieredStopAtLevel is greater than 3 |
|
308 |
|
309 Boolean useCompiler = WB.getBooleanVMFlag("UseCompiler"); |
|
310 if (useCompiler == null || !useCompiler) |
|
311 return "false"; |
|
312 |
|
313 Boolean useJvmciComp = WB.getBooleanVMFlag("UseJVMCICompiler"); |
|
314 if (useJvmciComp == null || !useJvmciComp) |
|
315 return "false"; |
|
316 |
|
317 // This check might be redundant but let's keep it for now. |
|
318 String jvmciCompiler = System.getProperty("jvmci.Compiler"); |
|
319 if (jvmciCompiler == null || !jvmciCompiler.equals("graal")) { |
|
320 return "false"; |
|
321 } |
|
322 |
|
323 Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation"); |
|
324 Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel"); |
|
325 // if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used |
|
326 if (tieredCompilation != null && tieredCompilation && compLevel != null && compLevel <= 3) |
|
327 return "false"; |
|
328 |
|
329 return "true"; |
|
330 } |
|
331 |
|
332 /** |
296 * Dumps the map to the file if the file name is given as the property. |
333 * Dumps the map to the file if the file name is given as the property. |
297 * This functionality could be helpful to know context in the real |
334 * This functionality could be helpful to know context in the real |
298 * execution. |
335 * execution. |
299 * |
336 * |
300 * @param map |
337 * @param map |