Temp4890
Temp4890

Reputation: 143

Perf trace calling function

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.

Upvotes: 2

Views: 2439

Answers (1)

Alexey Alexandrov
Alexey Alexandrov

Reputation: 3129

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.

Upvotes: 5

Related Questions