예제 #1
0
               env=env)
        return 0

    def prepare_env(self, env):
        return env

    def opt_phases(self):
        return []

    def hosting_registry(self):
        return java_vm_registry


_suite = mx.suite("sulong")

native_vm_registry = VmRegistry("Native",
                                known_host_registries=[java_vm_registry])
native_vm_registry.add_vm(GccVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(ClangVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(GccVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(ClangVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(GccVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(ClangVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(GccVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(ClangVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(SulongVm(), _suite, 10)

native_polybench_vm_registry = VmRegistry(
    "NativePolybench", known_host_registries=[java_vm_registry])
native_polybench_vm_registry.add_vm(
    PolybenchVm('debug-aux-engine-cache', [
        '--experimental-options', '--eval-source-only.0=true',
예제 #2
0
        suTruffleOptions = [
            '-Dgraal.TruffleBackgroundCompilation=false',
            '-Dgraal.TruffleTimeThreshold=1000000',
            '-Dgraal.TruffleInliningMaxCallerSize=10000',
            '-Dgraal.TruffleCompilationExceptionsAreFatal=true',
            mx_subst.path_substitutions.substitute('-Dpolyglot.llvm.libraryPath=<path:SULONG_LIBS>'),
            '-Dpolyglot.llvm.libraries=libgmp.so.10']
        sulongCmdLine = suTruffleOptions + mx_sulong.getClasspathOptions() + ['-XX:-UseJVMCIClassLoader', "com.oracle.truffle.llvm.launcher.LLVMLauncher"] + ['bench.bc']
        result = self.host_vm().run(cwd, sulongCmdLine + args)

        # reset current Directory
        os.chdir(self.currentDir)

        return result

    def hosting_registry(self):
        return java_vm_registry

_suite = mx.suite("sulong")

native_vm_registry = VmRegistry("Native", known_host_registries=[java_vm_registry])
native_vm_registry.add_vm(GccVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(ClangVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(GccVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(ClangVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(GccVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(ClangVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(GccVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(ClangVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(SulongVm(), _suite, 10)
예제 #3
0
    def hosting_registry(self):
        return java_vm_registry


class SulongMultiContextVm(SulongVm):
    def name(self):
        return "sulong-multi"

    def launcherClass(self):
        return "com.oracle.truffle.llvm.launcher.LLVMMultiContextLauncher"

    def launcherName(self):
        return "llimul"


_suite = mx.suite("sulong")

native_vm_registry = VmRegistry("Native",
                                known_host_registries=[java_vm_registry])
native_vm_registry.add_vm(GccVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(ClangVm('O0', ['-O0']), _suite)
native_vm_registry.add_vm(GccVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(ClangVm('O1', ['-O1']), _suite)
native_vm_registry.add_vm(GccVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(ClangVm('O2', ['-O2']), _suite)
native_vm_registry.add_vm(GccVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(ClangVm('O3', ['-O3']), _suite)
native_vm_registry.add_vm(SulongVm(), _suite, 10)
native_vm_registry.add_vm(SulongMultiContextVm(), _suite, 10)
        return [re.compile(r"Exception")]

    def group(self):
        return GROUP_GRAAL

    def name(self):
        return self._name

    def subgroup(self):
        return SUBGROUP_TRUFFLE_PYTHON

    def get_vm_registry(self):
        return python_vm_registry

    @classmethod
    def get_benchmark_suites(cls):
        return [cls(suite_name) for suite_name in benchmarks_list]


# ----------------------------------------------------------------------------------------------------------------------
#
# register locally VMs
#
# ----------------------------------------------------------------------------------------------------------------------
python_vm_registry = VmRegistry(PYTHON_VM_REGISTRY_NAME,
                                known_host_registries=[java_vm_registry])
python_vm_registry.add_vm(CPythonVm(CONFIGURATION_DEFAULT),
                          _truffle_python_suite)
python_vm_registry.add_vm(PyPyVm(CONFIGURATION_DEFAULT), _truffle_python_suite)
python_vm_registry.add_vm(GraalPythonVm(), _truffle_python_suite, 10)