[all-commits] [llvm/llvm-project] a34001: [llvm-exegesis] Unbreak `--benchmarks-file=<f>`

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sat Dec 17 16:50:43 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3400191137e7c991b89ebe72211790dae1648a1
      https://github.com/llvm/llvm-project/commit/a3400191137e7c991b89ebe72211790dae1648a1
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-18 (Sun, 18 Dec 2022)

  Changed paths:
    M llvm/test/tools/llvm-exegesis/X86/latency/latency-LEA64_32r.s
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp
    M llvm/unittests/tools/llvm-exegesis/Mips/BenchmarkResultTest.cpp
    M llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp

  Log Message:
  -----------
  [llvm-exegesis] Unbreak `--benchmarks-file=<f>`

I'm absolutely flabbergasted by this.
I was absolutely sure this worked.
But apparently not.

When outputting to the file, we'd write a single `InstructionBenchmark`
to it, and then close the file. And for the next `InstructionBenchmark`,
we'd reopen the file, truncating it in process,
and thus the first `InstructionBenchmark` would be gone...




More information about the All-commits mailing list