google/benchmark

[FR] Allow modification of perf attributes

Open

#1.897 geöffnet am 6. Jan. 2025

Auf GitHub ansehen
 (8 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)C++ (1.539 Forks)batch import
enhancementgood first issuehelp wanted

Repository-Metriken

Stars
 (7.968 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (19 gemergte PRs in 30 T)

Beschreibung

Is your feature request related to a problem? Please describe.

I have a multi-threaded benchmark where I'd like the performance counters to only measure the main thread.

Describe the solution you'd like

Setting the inherit attribute to false instead of true before passing the struct to perf_event_open would solve my issue. Some sort of configuration option which allows me to set this would be ideal. Maybe this can be extended to other attributes as well instead of hardcoding them.

Describe alternatives you've considered

Currently, I have to set it to false and recompile google benchmark.

Contributor Guide