Tracing CPU utilisation


Raga lahari
 

Hi,

Can someone please let me know that there is any way to get a CPU profile for a specific function using eBPF? 


Thanks & Regards, 

Ragalahari


Raga lahari
 


Hello,


Furthermore, I would like to add following, 


I have a function test() that takes a string as an input and next functionality depends on the value it received. I would like to trace CPU utilization of test() function along with the value of b 


int test(string b) {

     ......

}

 

expecting like,

test(b="abc")  -  40%

test(b="defghijkl") - 60%


Perf probe and record are providing the number of occurrences of test() along with the variable value, But, it's not giving CPU cycles taken in each time.

It would be great, If someone could share some pointer that can help me here. 



Regards,

Ragalahari