From fde26f6f097e6a56890ef3b81f6037b1e82e0c06 Mon Sep 17 00:00:00 2001 From: Abul Date: Thu, 30 Jul 2026 14:08:15 +0530 Subject: [PATCH] Opti --- tools/perfrunner/source/cachegrind.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perfrunner/source/cachegrind.d b/tools/perfrunner/source/cachegrind.d index c0f997bcff10..147c1afd35fc 100644 --- a/tools/perfrunner/source/cachegrind.d +++ b/tools/perfrunner/source/cachegrind.d @@ -16,13 +16,13 @@ long parseInstructions(string cgout) throw new Exception("could not find 'summary:' line in cachegrind output"); } -// Compile the workload under cachegrind +// Compile the workload under cachegrind. Only Ir is read, so the simulators stay off. long instructions(string dmd, string[] dflags, string workload, string tmp, string tag) { auto obj = buildPath(tmp, tag ~ ".o"); auto cgOut = buildPath(tmp, tag ~ ".cgout"); - auto cmd = ["valgrind", "--tool=cachegrind", "--cachegrind-out-file=" ~ cgOut, - dmd, "-c"] ~ dflags ~ [workload, "-of=" ~ obj]; + auto cmd = ["valgrind", "--tool=cachegrind", "--cache-sim=no", "--branch-sim=no", + "--cachegrind-out-file=" ~ cgOut, dmd, "-c"] ~ dflags ~ [workload, "-of=" ~ obj]; auto r = execute(cmd); if (r.status != 0) throw new Exception("cachegrind failed:\n" ~ r.output);