349 if (jvmciCompiler == null || !jvmciCompiler.equals("graal")) { 350 return "false"; 351 } 352 353 Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation"); 354 Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel"); 355 // if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used 356 if (tieredCompilation != null && tieredCompilation && compLevel != null && compLevel <= 3) 357 return "false"; 358 359 return "true"; 360 } 361 362 363 /** 364 * A simple check for docker support 365 * 366 * @return true if docker is supported in a given environment 367 */ 368 protected String dockerSupport() { 369 // currently docker testing is only supported for Linux-x64, Linux-s390x and Linux-ppc64le 370 String arch = System.getProperty("os.arch"); 371 if (! (Platform.isLinux() && (Platform.isX64() || Platform.isS390x() || arch.equals("ppc64le")))) { 372 return "false"; 373 } 374 375 boolean isSupported; 376 try { 377 isSupported = checkDockerSupport(); 378 } catch (Exception e) { 379 isSupported = false; 380 } 381 382 return (isSupported) ? "true" : "false"; 383 } 384 385 private boolean checkDockerSupport() throws IOException, InterruptedException { 386 ProcessBuilder pb = new ProcessBuilder("docker", "ps"); 387 Process p = pb.start(); 388 p.waitFor(10, TimeUnit.SECONDS); 389 390 return (p.exitValue() == 0); 391 } 392 393 394 395 /** 396 * Dumps the map to the file if the file name is given as the property. 397 * This functionality could be helpful to know context in the real 398 * execution. 399 * 400 * @param map | 349 if (jvmciCompiler == null || !jvmciCompiler.equals("graal")) { 350 return "false"; 351 } 352 353 Boolean tieredCompilation = WB.getBooleanVMFlag("TieredCompilation"); 354 Long compLevel = WB.getIntxVMFlag("TieredStopAtLevel"); 355 // if TieredCompilation is enabled and compilation level is <= 3 then no Graal is used 356 if (tieredCompilation != null && tieredCompilation && compLevel != null && compLevel <= 3) 357 return "false"; 358 359 return "true"; 360 } 361 362 363 /** 364 * A simple check for docker support 365 * 366 * @return true if docker is supported in a given environment 367 */ 368 protected String dockerSupport() { 369 boolean isSupported = false; 370 if (Platform.isLinux()) { 371 // currently docker testing is only supported for Linux, 372 // on certain platforms 373 374 String arch = System.getProperty("os.arch"); 375 376 if (Platform.isX64()) { 377 isSupported = true; 378 } 379 else if (Platform.isAArch64()) { 380 isSupported = true; 381 } 382 else if (Platform.isS390x()) { 383 isSupported = true; 384 } 385 else if (arch.equals("ppc64le")) { 386 isSupported = true; 387 } 388 } 389 390 if (isSupported) { 391 try { 392 isSupported = checkDockerSupport(); 393 } catch (Exception e) { 394 isSupported = false; 395 } 396 } 397 398 return (isSupported) ? "true" : "false"; 399 } 400 401 private boolean checkDockerSupport() throws IOException, InterruptedException { 402 ProcessBuilder pb = new ProcessBuilder("docker", "ps"); 403 Process p = pb.start(); 404 p.waitFor(10, TimeUnit.SECONDS); 405 406 return (p.exitValue() == 0); 407 } 408 409 410 411 /** 412 * Dumps the map to the file if the file name is given as the property. 413 * This functionality could be helpful to know context in the real 414 * execution. 415 * 416 * @param map |