google/benchmark

[FR] Allow modification of perf attributes

已关闭

#1,897 创建于 2025年1月6日

 (8 条评论) (2 个反应) (0 位负责人)C++ (1,539 个派生)batch import
enhancementgood first issuehelp wanted

仓库指标

星标
 (7,968 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南