{"record":{"id":"5756d0fb4dd955dc","repo":"oracle/graal","slug":"suite-runs-only-a-single-benchmark","errorCode":null,"errorMessage":"Suite runs only a single benchmark.","messagePattern":"Suite runs only a single benchmark\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2637,"sourceCode":"            return self.daCapoPath()\n\n    # The directory that contains `stats`, `launchers`, `dat` and `jar`\n    def dataLocation(self):\n        if self.version() == \"23.11-MR2-chopin\":\n            basePath = self.daCapoPath()\n            subdir = \"dacapo-23.11-MR2-chopin\"\n            if self.minimalArchive():\n                subdir += \"-minimal\"\n            return os.path.join(basePath, subdir)\n        else:\n            raise RuntimeError(f\"data location is not supported for suite version '{self.version()}'\")\n\n    def minimalArchive(self):\n        return False\n\n    def createCommandLineArgs(self, benchmarks, bmSuiteArgs):\n        if benchmarks is None:\n            raise RuntimeError(\n                \"Suite runs only a single benchmark.\")\n        if len(benchmarks) != 1:\n            raise RuntimeError(\n                f\"Suite runs only a single benchmark, got: {benchmarks}\")\n\n        benchmark = benchmarks[0]\n        runArgs = self.postprocessRunArgs(benchmark, self.runArgs(bmSuiteArgs))\n        if runArgs is None:\n            return None\n\n        jarPath = self.jarPath(benchmark)\n        return self.vmArgs(bmSuiteArgs) + [\"-jar\"] + [jarPath, benchmark] + runArgs\n\n    def benchmarkList(self, bmSuiteArgs):\n        missing_sizes = set(self.daCapoIterations().keys()).difference(set(self.daCapoSizes().keys()))\n        if len(missing_sizes) > 0:\n            mx.abort(f\"Missing size definitions for benchmark(s): {missing_sizes}\")\n        return [b for b, it in self.daCapoIterations().items()","sourceCodeStart":2619,"sourceCodeEnd":2655,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2619-L2655","documentation":"The DaCapo suite's createCommandLineArgs() builds a single 'java -jar dacapo.jar <bench> <args>' command, so it must receive exactly one benchmark name. benchmarks == None means the caller invoked the suite without naming a benchmark, which this suite cannot expand automatically.","triggerScenarios":"Running mx benchmark with the DaCapo suite but no benchmark selector, e.g. 'mx benchmark dacapo-chopin' with no ':benchmark' suffix and no benchmark in the args.","commonSituations":"Copy-pasting a generic benchmark command that works for suites running all benchmarks by default (like SPECjvm2008) but not for DaCapo here; scripts that omit the benchmark argument.","solutions":["Name the benchmark explicitly: mx benchmark dacapo-chopin:fop (or lusearch, h2, etc.).","If you want the list of valid names, run the suite's benchmark listing (mx benchmark ... with the suite's list mode) and pick one.","Script authors: make the benchmark a required parameter instead of optional."],"exampleFix":"# before\nmx benchmark dacapo-chopin\n\n# after\nmx benchmark dacapo-chopin:fop","handlingStrategy":"validation","validationCode":"benchmarks = benchmarks if benchmarks is not None else []\nassert benchmarks, \"DaCapo suite requires exactly one benchmark name, e.g. dacapo-chopin:fop\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the benchmark name as a required argument in scripts around mx benchmark.","Validate the selector is non-empty before delegating to createCommandLineArgs."],"tags":["graalvm","benchmark","dacapo","usage","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}