User forums > Using Code::Blocks

Profiling a library

(1/5) > >>

tigerbeard:
I have a library plugin (DLL) with performance issues. I'd like to profile that, but do not have access to the source of the target application. I can debug it in the target, but I do not know how to use the profiler plugin with a library.

For a executable I set the profiling compiler flag and it reads the executable after execution.

With the lib I comile with the flag and open the profiler plugin and it says
 Error: The target is not executable

oBFusCATed:
Just use perf and flamegraphs, don't bother with gprof. There is a hotspot UI for perf which is nice...

tigerbeard:
Thanks great tip. Flame graphs made by that tool are really looking good to quickly get to the beef. I guess perf would fill in for missing stuff like hit counts etc. 
Only one tiny thing I forgot to mention: that libray in question is a windows DLL. Running in a Windows only environment (graphics, so no VM possible)

BlueHazzard:
Profiling on windows is a pain in the a*** with open source tools... I had some success with "Very Sleepy" http://www.codersnotes.com/sleepy/ I don't know if you can profile dlls with it...

tigerbeard:
From the description is can connect to a live PID, which is good.
Wether it runs with a process which was not compiled for profiling, but is calling a DLL compiled for profiing is to be found out.

Navigation

[0] Message Index

[#] Next page

Go to full version