diff options
author | Filippo Barbari <121092059+fbarbari@users.noreply.github.com> | 2024-04-25 21:44:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 21:44:25 +0200 |
commit | 9d7ad0452b6ba7981d8d3605fe699fca972b9252 (patch) | |
tree | 4534766694959e9cf96dea8868ec56ada922a138 /lib/compilers/java.ts | |
parent | f59bad3a7eb145245ce530a83fbba65e6a475821 (diff) | |
download | compiler-explorer-9d7ad0452b6ba7981d8d3605fe699fca972b9252.tar.gz compiler-explorer-9d7ad0452b6ba7981d8d3605fe699fca972b9252.zip |
Removed UseDynamicNumberOfCompilerThreads command-line argument when running on java <11 (#6397)gh-11519
This fixes #6388.
---------
Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
Diffstat (limited to 'lib/compilers/java.ts')
-rw-r--r-- | lib/compilers/java.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compilers/java.ts b/lib/compilers/java.ts index 894f04a0f..fc7691b8a 100644 --- a/lib/compilers/java.ts +++ b/lib/compilers/java.ts @@ -25,6 +25,7 @@ import path from 'path'; import fs from 'fs-extra'; +import Semver from 'semver'; import type {ParsedAsmResult, ParsedAsmResultLine} from '../../types/asmresult/asmresult.interfaces.js'; import {BypassCache} from '../../types/compilation/compilation.interfaces.js'; @@ -132,12 +133,16 @@ export class JavaCompiler extends BaseCompiler implements SimpleOutputFilenameCo override async handleInterpreting(key, executeParameters: ExecutableExecutionOptions) { const compileResult = await this.getOrBuildExecutable(key, BypassCache.None); if (compileResult.code === 0) { + const extraXXFlags: string[] = []; + if (Semver.gte(utils.asSafeVer(this.compiler.semver), '11.0.0', true)) { + extraXXFlags.push('-XX:-UseDynamicNumberOfCompilerThreads'); + } executeParameters.args = [ '-Xss136K', // Reduce thread stack size '-XX:CICompilerCount=2', // Reduce JIT compilation threads. 2 is minimum - '-XX:-UseDynamicNumberOfCompilerThreads', '-XX:-UseDynamicNumberOfGCThreads', '-XX:+UseSerialGC', // Disable parallell/concurrent garbage collector + ...extraXXFlags, await this.getMainClassName(compileResult.dirPath), '-cp', compileResult.dirPath, |