gprofile+ROOT

Hi, I have a dynamically linked library loadable within ROOT. I would like to profile it. The library sources are compiled and linked with -pg option. But ROOT and other external libraries used are not. I believe this is a blocker for using gprofile.

root[0] gSystem->Load(“lib”)
root[1] object->run(100)
root[2] .q

and a gmon.out file should exist now. Any experience on how to this properly, or any other hint, including a free replacement profiler except gprofiler that can do this?
Thanks,
filimon

Hi,

I think that to use gprofile you will need to compile all of ROOT with the pg options. A good alternative is the tool ‘callgrind’ within valgrind.

Cheers,
Philippe.