(
key: CacheKey,
executeParameters: ExecutableExecutionOptions,
)
| 176 | } |
| 177 | |
| 178 | override async handleInterpreting( |
| 179 | key: CacheKey, |
| 180 | executeParameters: ExecutableExecutionOptions, |
| 181 | ): Promise<CompilationResult> { |
| 182 | const executionPackageHash = this.env.getExecutableHash(key); |
| 183 | const compileResult = await this.getOrBuildExecutable(key, BypassCache.None, executionPackageHash); |
| 184 | if (compileResult.code === 0) { |
| 185 | const extraXXFlags: string[] = []; |
| 186 | if (Semver.gte(utils.asSafeVer(this.compiler.semver), '11.0.0', true)) { |
| 187 | extraXXFlags.push('-XX:-UseDynamicNumberOfCompilerThreads'); |
| 188 | } |
| 189 | assert(compileResult.dirPath !== undefined); |
| 190 | executeParameters.args = [ |
| 191 | '-Xss136K', // Reduce thread stack size |
| 192 | '-XX:CICompilerCount=2', // Reduce JIT compilation threads. 2 is minimum |
| 193 | '-XX:-UseDynamicNumberOfGCThreads', |
| 194 | '-XX:+UseSerialGC', // Disable parallell/concurrent garbage collector |
| 195 | ...extraXXFlags, |
| 196 | await this.getMainClassName(compileResult.dirPath), |
| 197 | '-cp', |
| 198 | compileResult.dirPath, |
| 199 | ...executeParameters.args, |
| 200 | ]; |
| 201 | const result = await this.runExecutable(this.javaRuntime, executeParameters, compileResult.dirPath); |
| 202 | return { |
| 203 | ...result, |
| 204 | didExecute: true, |
| 205 | buildResult: compileResult, |
| 206 | }; |
| 207 | } |
| 208 | return { |
| 209 | stdout: compileResult.stdout, |
| 210 | stderr: compileResult.stderr, |
| 211 | code: compileResult.code, |
| 212 | didExecute: false, |
| 213 | buildResult: compileResult, |
| 214 | timedOut: false, |
| 215 | }; |
| 216 | } |
| 217 | |
| 218 | async getMainClassName(dirPath: string) { |
| 219 | const maxSize = this.env.ceProps('max-asm-size', 64 * 1024 * 1024); |
nothing calls this directly
no test coverage detected