2

perf is a tool which accesses the performance counter registers of an machine and gives out metrics to user to analyze the system performance.

What I am curious about is, when I read the parts of code. I see perf reading something from a memory mapped area (I feel it reads an area which is been written by the kernel), it is also reading /proc/modules, but I could not find any code related to actual read of hardware registers of machine.

  • How does perf actually record its samples?
  • How does it identify what function is an executable is executing?
  • How does it know the symbols?

Does the kernel also have a module of perf inside (apart from /tools to convey the application 'perf' running in user space)?

Can anyone brief me about the internal working in detail?

2
  • Have you look at the perf documentation and source code yet ? github.com/torvalds/linux/tree/master/tools/perf Commented Aug 11, 2015 at 8:46
  • 1
    yeah i am currently going through it, but quite confused with its modularity, i see some new things like kernel maps, module creations etc, any way thanks for suggestion, its documentation stresses more on usage of tool rather than its actual working Commented Aug 11, 2015 at 8:50

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.