示例#1
0
def mx_init(suite):
    mx.add_argument('--vmdir', dest='vmdir', help='directory for VM executable, shared libraries boot image and related files', metavar='<path>')

    commands = {
        'c1x': [c1x, '[options] patterns...'],
        'configs': [configs, ''],
        'copycheck': [copycheck, ''],
        'eclipse': [eclipse, '[VM options]'],
        'gate': [gate, '[options]'],
        'hcfdis': [hcfdis, '[options] files...'],
        'helloworld': [helloworld, '[VM options]'],
        'inspecthelloworld': [inspecthelloworld, '[VM options]'],
        'image': [image, '[options] classes|packages...'],
        'inspect': [inspect, '[options] [class | -jar jarfile]  [args...]'],
        'inspectoragent': [inspectoragent, '[-impl target] [-port port]'],
        'jnigen': [jnigen, ''],
        'jvmtigen': [jvmtigen, ''],
        'optionsgen': [optionsgen, ''],
        'jttgen': [jttgen, ''],
        'loggen': [loggen, ''],
        'makejdk': [makejdk, '[<destination directory>]'],
        'methodtree': [methodtree, '[options]'],
        'nm': [nm, '[options] [boot image file]', _vm_image],
        'objecttree': [objecttree, '[options]'],
        'olc': [olc, '[options] patterns...', _patternHelp],
        'site' : [site, '[options]'],
        't1x': [t1x, '[options] patterns...'],
        't1xgen': [t1xgen, ''],
        'test': [test, '[options]'],
        'verify': [verify, '[options] patterns...', _patternHelp],
        'view': [view, '[options]'],
        'vm': [vm, '[options] [class | -jar jarfile]  [args...]'],
        'wikidoc': [wikidoc, '[options]']
    }
    mx.update_commands(suite, commands)
示例#2
0
def mx_init(suite):
    mx.add_argument('--vmdir', dest='vmdir', help='directory for VM executable, shared libraries boot image and related files', metavar='<path>')

    commands = {
        'c1x': [c1x, '[options] patterns...'],
        'configs': [configs, ''],
        'copycheck': [copycheck, ''],
        'eclipse': [eclipse, '[VM options]'],
        'gate': [gate, '[options]'],
        'hcfdis': [hcfdis, '[options] files...'],
        'helloworld': [helloworld, '[VM options]'],
        'inspecthelloworld': [inspecthelloworld, '[VM options]'],
        'image': [image, '[options] classes|packages...'],
        'inspect': [inspect, '[options] [class | -jar jarfile]  [args...]'],
        'inspectoragent': [inspectoragent, '[-impl target] [-port port]'],
        'jnigen': [jnigen, ''],
        'jvmtigen': [jvmtigen, ''],
        'optionsgen': [optionsgen, ''],
        'jttgen': [jttgen, ''],
        'loggen': [loggen, ''],
        'makejdk': [makejdk, '[<destination directory>]'],
        'methodtree': [methodtree, '[options]'],
        'nm': [nm, '[options] [boot image file]', _vm_image],
        'objecttree': [objecttree, '[options]'],
        'olc': [olc, '[options] patterns...', _patternHelp],
        'site' : [site, '[options]'],
        't1x': [t1x, '[options] patterns...'],
        't1xgen': [t1xgen, ''],
        'test': [test, '[options]'],
        'verify': [verify, '[options] patterns...', _patternHelp],
        'view': [view, '[options]'],
        'vm': [vm, '[options] [class | -jar jarfile]  [args...]'],
        'wikidoc': [wikidoc, '[options]'],
    }
    mx.update_commands(suite, commands)
示例#3
0
    mxpy = join(mx._mx_home, 'mx.py')
    commands = [sys.executable, '-u', mxpy, '--java-home=' + mx.get_jdk().home]
    return ' '.join(commands)


mx_subst.path_substitutions.register_no_arg('mx_exe', get_mx_exe)


def get_jacoco_setting():
    return mx_gate._jacoco


mx_subst.path_substitutions.register_no_arg('jacoco', get_jacoco_setting)

mx.add_argument('--jacoco-exec-file',
                help='the coverage result file of JaCoCo',
                default='jacoco.exec')


def mx_post_parse_cmd_line(opts):
    mx_gate.JACOCO_EXEC = opts.jacoco_exec_file


def getGCCVersion(gccProgram):
    """executes the program with --version and extracts the GCC version string"""
    versionString = getVersion(gccProgram)
    gccVersion = re.search(r'((\d\.\d).\d)', versionString, re.IGNORECASE)
    if gccVersion is None:
        exit("could not find the GCC version string in " + str(versionString))
    else:
        return gccVersion.group(2)
示例#4
0
            provider = arcname[:-len('.class'):].replace('/', '.')
            self.services.setdefault('com.oracle.graal.options.OptionDescriptors', []).append(provider)
        return False

    def __addsrc__(self, arcname, contents):
        return False

    def __closing__(self):
        pass

mx.update_commands(_suite, {
    'vm': [run_vm, '[-options] class [args...]'],
    'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
})

mx.add_argument('-M', '--jvmci-mode', action='store', choices=sorted(_jvmciModes.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmciMode + ')')

def mx_post_parse_cmd_line(opts):
    if opts.jvmci_mode is not None:
        _vm.update(opts.jvmci_mode)
    for dist in [d.dist() for d in _bootClasspathDists]:
        dist.set_archiveparticipant(GraalArchiveParticipant(dist))

def _update_JVMCI_library():
    """
    Updates the "path" and "sha1" attributes of the "JVMCI" library to
    refer to a jvmci.jar created from the JVMCI classes in JDK9.
    """
    suiteDict = _suite.suiteDict
    jvmciLib = suiteDict['libraries']['JVMCI']
    d = join(_suite.get_output_root(), abspath(_jdk.home)[1:])
示例#5
0
                mx.warn('@Option defined in test code will be ignored: ' + arcname)
            else:
                # Need to create service files for the providers of the
                # jdk.vm.ci.options.Options service created by
                # jdk.vm.ci.options.processor.OptionProcessor.
                provider = arcname[:-len('.class'):].replace('/', '.')
                self.services.setdefault('com.oracle.graal.options.OptionDescriptors', []).append(provider)
        return False

    def __addsrc__(self, arcname, contents):
        return False

    def __closing__(self):
        pass

mx.add_argument('--vmprefix', action='store', dest='vm_prefix', help='prefix for running the VM (e.g. "gdb --args")', metavar='<prefix>')
mx.add_argument('--gdb', action='store_const', const='gdb --args', dest='vm_prefix', help='alias for --vmprefix "gdb --args"')
mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"')

mx.update_commands(_suite, {
    'vm': [run_vm, '[-options] class [args...]'],
    'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
})

def mx_post_parse_cmd_line(opts):
    mx.add_ide_envvar('JVMCI_VERSION_CHECK')
    for dist in _suite.dists:
        dist.set_archiveparticipant(GraalArchiveParticipant(dist, isTest=dist.name.endswith('_TEST')))
    add_bootclasspath_append(mx.distribution('truffle:TRUFFLE_API'))
    global _vm_prefix
    _vm_prefix = opts.vm_prefix
示例#6
0
mx.update_commands(
    _suite, {
        'make': [_runmake, '[args...]', _makehelp],
        'multimake': [_runmultimake, '[options]'],
        'c1visualizer': [c1visualizer, ''],
        'hsdis': [hsdis, '[att]'],
        'hcfdis': [hcfdis, ''],
        'igv': [igv, ''],
        'jol': [jol, ''],
        'vm': [run_vm, '[-options] class [args...]'],
    })

mx.add_argument('-M',
                '--jvmci-mode',
                action='store',
                choices=sorted(_jvmciModes.viewkeys()),
                help='the JVM variant type to build/run (default: ' +
                _vm.jvmciMode + ')')
mx.add_argument('--jdk-jvm-variant',
                '--vm',
                action='store',
                choices=_jdkJvmVariants + sorted(_legacyVms.viewkeys()),
                help='the JVM variant type to build/run (default: ' +
                _vm.jvmVariant + ')')
mx.add_argument('--jdk-debug-level',
                '--vmbuild',
                action='store',
                choices=_jdkDebugLevels + sorted(_legacyVmbuilds.viewkeys()),
                help='the JDK debug level to build/run (default: ' +
                _vm.debugLevel + ')')
mx.add_argument('-I',
示例#7
0
                provider = arcname[:-len('.class'):].replace('/', '.')
                self.services.setdefault(
                    'org.graalvm.compiler.options.OptionDescriptors',
                    []).append(provider)
        return False

    def __addsrc__(self, arcname, contents):
        return False

    def __closing__(self):
        pass


mx.add_argument('--vmprefix',
                action='store',
                dest='vm_prefix',
                help='prefix for running the VM (e.g. "gdb --args")',
                metavar='<prefix>')
mx.add_argument('--gdb',
                action='store_const',
                const='gdb --args',
                dest='vm_prefix',
                help='alias for --vmprefix "gdb --args"')
mx.add_argument('--lldb',
                action='store_const',
                const='lldb --',
                dest='vm_prefix',
                help='alias for --vmprefix "lldb --"')


def sl(args):
示例#8
0
        pass


mx.update_commands(
    _suite,
    {
        "vm": [run_vm, "[-options] class [args...]"],
        "ctw": [ctw, "[-vmoptions|noinline|nocomplex|full]"],
        "microbench": [microbench, "[VM options] [-- [JMH options]]"],
    },
)

mx.add_argument(
    "-M",
    "--jvmci-mode",
    action="store",
    choices=sorted(_jvmciModes.viewkeys()),
    help="the JVM variant type to build/run (default: " + _vm.jvmciMode + ")",
)


def mx_post_parse_cmd_line(opts):
    if opts.jvmci_mode is not None:
        _vm.update(opts.jvmci_mode)
    for dist in [d.dist() for d in _bootClasspathDists]:
        dist.set_archiveparticipant(GraalArchiveParticipant(dist))


def _update_JVMCI_library():
    """
    Updates the "path" and "sha1" attributes of the "JVMCI" library to
示例#9
0
文件: mx_jvmci.py 项目: mearvk/JVM
    def description(self):
        return "JVMCI JDK"

mx.update_commands(_suite, {
    'make': [_runmake, '[args...]', _makehelp],
    'multimake': [_runmultimake, '[options]'],
    'c1visualizer' : [c1visualizer, ''],
    'hsdis': [hsdis, '[att]'],
    'hcfdis': [hcfdis, ''],
    'igv' : [igv, ''],
    'jol' : [jol, ''],
    'vm': [run_vm, '[-options] class [args...]'],
})

mx.add_argument('-M', '--jvmci-mode', action='store', choices=sorted(_jvmciModes.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmciMode + ')')
mx.add_argument('--jdk-jvm-variant', '--vm', action='store', choices=_jdkJvmVariants + sorted(_legacyVms.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmVariant + ')')
mx.add_argument('--jdk-debug-level', '--vmbuild', action='store', choices=_jdkDebugLevels + sorted(_legacyVmbuilds.viewkeys()), help='the JDK debug level to build/run (default: ' + _vm.debugLevel + ')')
mx.add_argument('-I', '--use-jdk-image', action='store_true', help='build/run JDK image instead of exploded JDK')

mx.addJDKFactory(_JVMCI_JDK_TAG, mx.JavaCompliance('9'), JVMCI9JDKFactory())

def mx_post_parse_cmd_line(opts):
    mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)

    jdkTag = mx.get_jdk_option().tag

    jvmVariant = None
    debugLevel = None
    jvmciMode = None