bpftool CPU profiling support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux