BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v4 0/3] bpftool: Improve perf counter reporting
@ 2026-09-16 19:26 Mykyta Yatsenko
  2026-09-16 19:26 ` [PATCH bpf-next v4 1/3] bpftool: Accept zero perf counter snapshots Mykyta Yatsenko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mykyta Yatsenko @ 2026-09-16 19:26 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel, kernel-team, eddyz87, memxor; +Cc: Mykyta Yatsenko

Accept valid perf snapshots whose counter is zero. Group selected metrics
per CPU so derived ratios cover the same scheduling intervals. Scale each
per-CPU counter before aggregation and report cycles per program run.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
---
Changes in v4:
- Use enabled time to recognize valid zero-counter snapshots.
- Build and enable each CPU's complete perf event group in one pass.
- Keep run_cnt as the total count, drop run_cnt_valid.
- Link to v3: https://patch.msgid.link/20260908-bpftool_cyles_per_run-v3-0-60e86f325c35@meta.com

Changes in v3:
- Keep the JSON value field raw. Add value_scaled and run_cnt_valid.
- Use the same CPU set for all metrics.
- Move snapshot state tracking to a separate patch.
- Link to v2: https://patch.msgid.link/20260902-bpftool_cyles_per_run-v2-1-bc5d14ad0ce9@meta.com

Changes in v2:
- Scale all counters.
- Use an enum for metric indexes.
- Link to v1: https://patch.msgid.link/20260827-bpftool_cyles_per_run-v1-1-77d7bfc3c065@meta.com

---
Mykyta Yatsenko (3):
      bpftool: Accept zero perf counter snapshots
      bpftool: Group profile events by CPU
      bpftool: Scale counters and report cycles per run

 tools/bpf/bpftool/Documentation/bpftool-prog.rst |  11 +-
 tools/bpf/bpftool/prog.c                         | 209 ++++++++++++++---------
 tools/bpf/bpftool/skeleton/profiler.bpf.c        |  21 +--
 3 files changed, 148 insertions(+), 93 deletions(-)
---
base-commit: 847b984213626bee356d550dc1a8df12e683e50f
change-id: 20260827-bpftool_cyles_per_run-93169fcb30b7

Best regards,
--  
Mykyta Yatsenko <yatsenko@meta.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-17 22:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 19:26 [PATCH bpf-next v4 0/3] bpftool: Improve perf counter reporting Mykyta Yatsenko
2026-09-16 19:26 ` [PATCH bpf-next v4 1/3] bpftool: Accept zero perf counter snapshots Mykyta Yatsenko
2026-09-16 20:07   ` bot+bpf-ci
2026-09-16 19:26 ` [PATCH bpf-next v4 2/3] bpftool: Group profile events by CPU Mykyta Yatsenko
2026-09-16 19:26 ` [PATCH bpf-next v4 3/3] bpftool: Scale counters and report cycles per run Mykyta Yatsenko
2026-09-17 22:30 ` [PATCH bpf-next v4 0/3] bpftool: Improve perf counter reporting patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox