[FR] Allow modification of perf attributes
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.
@dmah42 do you have any suggestions on what the interface to set the config should look like - as in, should it be a cmd line argument, an argument in the benchmark macros, etc. If you can suggest what the interface should be like maybe I can implement it when I get some time.
i think a command line argument is probably the right way to go as it affects the entire run.