BPF List
 help / color / mirror / Atom feed
* bpftool CPU profiling support
@ 2024-11-19  5:14 Keren Kotler
  2024-11-21 11:15 ` Quentin Monnet
  0 siblings, 1 reply; 2+ messages in thread
From: Keren Kotler @ 2024-11-19  5:14 UTC (permalink / raw)
  To: bpf

Hi,

I saw bpftool profile supports cycles metric via
PERF_COUNT_HW_CPU_CYCLES event, which is not supported on some
platforms*. I wondered why there is no support to measure CPU load of
a (ebpf) program via PERF_COUNT_SW_CPU_CLOCK event - I patched the
bpftool to support it (as a POC just replaced the attr event def in
the metric list) and it seems to be working.

So my questions:
1. Is it risky to use it? (Why wasn’t it supported in the first place?)
2. Does it make sense to finish the patch and send in order to release it?

Thanks,
Keren


*specifically I tried to run it on Intel(R) Xeon(R) CPU E5-2628 v4 @
2.30GHz (Ubuntu 24, kernel 6.8.0-48-generic) using AWS EC2 machine
(and previously on an Azure machine). I suspect it might not be widely
supported on cloud providers hardwares, but didn’t research this
theory.

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

end of thread, other threads:[~2024-11-21 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19  5:14 bpftool CPU profiling support Keren Kotler
2024-11-21 11:15 ` Quentin Monnet

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