Re: bpftool CPU profiling support

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

 



2024-11-19 07:14 UTC+0200 ~ Keren Kotler <kerenkotlerk@xxxxxxxxx>
> 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.
> 


Hi Keren,

As discussed off-list: I'm not aware of any particular reason blocking
support for this metric in bpftool. I suppose that SW cycles count is
not supported today simply because nobody has needed it to the point
they'd spend the time to implement the feature, so far.

So if you're interested in adding support, yes go ahead, thanks for
working on this!

Quentin




[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