runners: bench: Added best effort --list-probes, --list-case-probes, etc

Adds a set of flags to query the bench_runner for available probes:

- --list-probes       - List estimated probes
- --list-suite-probes - List estimated probes for each bench suite
- --list-case-probes  - List estimated probes for each bench case

What's fun though, is we don't actually know the bench probes at compile
time, since the BENCH_* macros take a C string. But we're already
preprocessing bench_*.toml with Python, so guessing what probes are
available is easy with a bit of regex:

  BENCH_(?:STOP|F?RESULT)\( *"((?:\\.|[^"])*)"

This does make the --list*probes flags best effort, but I think unlikely
to break in practice.
This commit is contained in:
Christopher Haster
2026-02-08 05:16:23 -06:00
parent 95fddd3c18
commit 81d681cab2
3 changed files with 235 additions and 14 deletions
+3
View File
@@ -116,6 +116,9 @@ struct bench_case {
const bench_define_t *defines;
size_t permutations;
const char **probes;
size_t probe_count;
bool (*if_)(void);
void (*run)(const struct lfs3_cfg *cfg);
};