1

I want to use CPU Profiler from google-perftools (gperftools's libprofiler.so ), which is described here: http://gperftools.googlecode.com/svn/trunk/doc/cpuprofile.html

In my setup I want to run the program to be profiled several times (up to 1500; each run is different) and then combine pprof outputs from all runs (or from some subset of runs) into single pprof file.

How can I do this?

PS: My program uses almost no shared libraries, so only single binary (elf) file will be analyzed.

PPS: Thanks to Chris, pprof can use several profiles:

pprof ./program first.pprof.out second.pprof.out ...
osgx
  • 90,338
  • 53
  • 357
  • 513
  • 1
    Do you need a single file, or just a combined profile? In the latter case, pprof does accept multiple profile files on the command line. – Chris Jan 29 '13 at 17:18
  • Thanks! It will solve some problems, but I want to have combined files to save disk space and to be able to work with extremely big number of files (bigger than allowed in single command line). – osgx Jan 29 '13 at 19:03
  • I think you're out of luck, since combining profiles does not seem to work correctly even on the command line: http://code.google.com/p/gperftools/issues/detail?id=251 – Chris Jan 29 '13 at 20:47
  • Chris, this is not a problem for my case, I have mostly statically-linked application and I already disabled ASLR. So, in all 1500 runs most interesting addresses are the same – osgx Jan 30 '13 at 00:04

0 Answers0