def run(self, cwd, args): if hasattr(self.host_vm(), 'run_launcher'): return self.host_vm().run_launcher('espresso', self._options + args, cwd) else: return self.host_vm().run( cwd, mx_espresso._espresso_standalone_command(self._options + args))
def run(self, cwd, args): if hasattr(self.host_vm(), 'run_launcher'): if '-truffle' in self.host_vm().extra_launcher_args: return self.host_vm().run_launcher('java', self._options + args, cwd) # The host-vm is in JVM mode. Run the `espresso` launcher. return self.host_vm().run_launcher('espresso', self._options + args, cwd) else: return self.host_vm().run( cwd, mx_espresso._espresso_standalone_command(self._options + args))
def run(self, cwd, args): if hasattr(self.host_vm(), 'run_launcher'): if mx.suite('vm', fatalIfMissing=False): import mx_vm_benchmark if isinstance( self.host_vm(), mx_vm_benchmark.GraalVm ) and '--native' in self.host_vm().extra_launcher_args: # The host-vm is a GraalVM in native mode. Do not pass `--native` and run `java -truffle`. self.host_vm().extra_launcher_args.remove('--native') return self.host_vm().run_launcher( 'java', ['-truffle'] + self._options + args, cwd) # The host-vm is in JVM mode. Run the `espresso` launcher. return self.host_vm().run_launcher('espresso', self._options + args, cwd) else: return self.host_vm().run( cwd, mx_espresso._espresso_standalone_command(self._options + args))
def run_with_heap(heap, args, timeout, suppressStderr=True, nonZeroIsFatal=False): mx.log('Trying with %sMB of heap...' % heap) with PTimeout(timeout): if hasattr(self.host_vm(), 'run_launcher'): _args = self._options + ['--jvm.Xmx{}M'.format(heap) ] + args _exit_code, stdout, dims = self.host_vm().run_launcher( 'espresso', _args, cwd) else: _args = ['-Xmx{}M'.format(heap) ] + mx_espresso._espresso_standalone_command( self._options + args) _exit_code, stdout, dims = self.host_vm().run(cwd, _args) if _exit_code: mx.log('failed') else: mx.log('succeeded') run_info['stdout'] = stdout run_info['dims'] = dims return _exit_code