5

I have to profile my multithreaded C++ app and find its bottlenecks. The problem is: I need to see wall clock profile. I have used oprofile and perf. No one can provide me such information.

I have used perf record -g -e sched:sched_stat_sleep <cmd> but perf record falls with SIGFPE exception. This makes me angry.

Valgrind doesn't suits me because I use fanotify_mark syscall which is not implemented in this tool.

I'm not sure google's perftools can do wall clock profiling - I haven't see any info in their documentation.

Can anyone suggest? Thank you.

milo
  • 1,220
  • 3
  • 17
  • 33
  • Duplicate of http://stackoverflow.com/questions/2803930/get-gprof-to-profile-based-on-wall-clock-time ? – simonc Oct 26 '12 at 14:52
  • 1
    Not really a dupe in my opinion as it focuses on `gprof`, but one of it's answers might help indeed: http://stackoverflow.com/a/9206184/694576 – alk Oct 26 '12 at 14:54
  • If you follow @alk's (Thank you!) link and beyond, you will find also http://stackoverflow.com/a/378024/1741542, http://stackoverflow.com/a/927773/1741542 and http://poormansprofiler.org/ – Olaf Dietsche Oct 26 '12 at 17:03

1 Answers1

3

Try PAPI http://web.eecs.utk.edu/~terpstra/using_papi/, it is an open source profiler. I normally use this profiler to measure the cache performance (e.g, misses and accesses) in some algorithms. Maybe it can be useful also for what you want.

If you have MAC, have a look on the profiler "instruments"

dreamcrash
  • 47,137
  • 25
  • 94
  • 117