2

I am maintaining a kernel module on linux 2.6.18 (RHEL 5.5) kernel and we are seeing some performance issues.

I am trying to use oprofile for general profiling but it does not provide (or I do not know the option) statistics regarding how many times a function was called or how much time it took to execute a particular function. I can write my own code for measuring time taken in executing each function but it would be difficult to insert this into each function.

Is there a profiler that can accomplish this?

ghostkadost
  • 502
  • 4
  • 14
  • Try perf instead, see my answer here: http://stackoverflow.com/questions/2229336/linux-application-profiling/2229834#2229834 – holygeek Sep 06 '11 at 08:40
  • Is `perf` available for 2.6.18 kernel? – ghostkadost Sep 06 '11 at 10:55
  • 1
    Unfortunately no. It's in 2.6.31 onwards. Maybe you can run your module under the latest kernel version, perf it, analyze the results and backport the needed modification? It's a bit of a long shot. – holygeek Sep 06 '11 at 13:41

1 Answers1

1

Try also using the latest flamegraphs.

Massimiliano
  • 7,842
  • 2
  • 47
  • 62
man3
  • 161
  • 7