Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perf trace calling function

Tags:

linux

perf

I am learning how to use perf. I have used perf stat followed by perf report. So I noticed that I was getting cache misses in memcpy. Is it possible to do a backtrace of some sort to figure out which memcpy this is? Just knowing that it's from memcpy is pretty useless.

like image 777
Temp4890 Avatar asked Jul 26 '26 17:07

Temp4890


1 Answers

Passing -g flag to perf record will make it collect the call stacks with each event. Viewing perf report for a trace collected with the -g flag will help you understand where the problematic memcpy was called from. You may also want to use the --children flag of the perf report command.

like image 127
Alexey Alexandrov Avatar answered Jul 28 '26 05:07

Alexey Alexandrov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!