开发者

How can I profile pure dll?

I have project that creates dlls. These dlls are invoked from python later by special plugin system blue-sky. So in this project it's very hard to build executable file, but I need profiling. Are there any profilers 开发者_如何学JAVAthat can work with pure dlls?

I've tried Intel Amplifier, Microsoft VS2008 profiler they don't work. I've also tried Very Sleepy but its features are limited.


If your dll is loaded by Python then you need to profile the Python process. With the Microsoft profiler as long as all the .pdb files are present it should resolve symbols within the dll. Another option is to create an executable that loads and calls the functions you're interested in and then profile said executable.

E.g. You may have a "python.exe" process that is running your python program which is loading the .dll and you can attach the visual studio command line profiler to it by:

vsperfcmd /attach:"python.exe"


You can't profile code that isn't running- that's the definition of profiling. You will need to build something that can run (an executable file) that links to the DLL and use that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜