[PATCH] D148085: [llvm-exegesis] Add subprocess benchmarking mode

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 02:26:34 PDT 2023


aidengrossman added reviewers: courbet, gchatelet, ondrasej.
aidengrossman added a comment.

This patch adds in the subprocess benchmarking mode (phase 1 of the RFC linked in the description). I can understand some hesitancy on getting this pushed through since the RFC hasn't been discussed thoroughly, so I can definitely wait until we have everything nailed down there if necessary. After this patch, I plan on working on an assembly test harness so that we have the control over memory that we need and then I plan on adding the proposed annotations.

Hopefully this code isn't too hacky and review isn't too difficult. I have never worked with low level process control functions on Linux in a production environment before (e.g., still have never experienced most of the footguns of `fork()`).

There are two minor issues with this patch that I still need to address, namely that it only supports sending a single `CounterValue` from the benchmarking process to the `llvm-exegesis` process (so LBR doesn't work), and that there are some slight systematic differences in measurements between the subprocess mode and the in-process mode (at least on my system, dual socket E5-2670 sandy bridge). I haven't done a ton of investigation into why this issue is occurring, but it is relatively minor (only about a 1% difference), and I imagine should be alleviated once we switch to the assembly test harness (if that's the route we end up going down).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148085/new/

https://reviews.llvm.org/D148085



More information about the llvm-commits mailing list