开发者

Profiling shared library/plugins written in C++ for Python?

开发者 https://www.devze.com 2022-12-23 17:42 出处:网络
I\'ve got a C++ library that lets me write plugins in C++ and then automatically exposes them to python.I\'m working on some networking stuff in a plugin and I\'d like to profile it with something lik

I've got a C++ library that lets me write plugins in C++ and then automatically exposes them to python. I'm working on some networking stuff in a plugin and I'd like to profile it with something like gprof, but simply compiling with -pg and running the plugin via python doesn't generated the necessary profiling data. Unfortunately the plugins are tightly coupled so it's not possible to run them as standalone programs. Does anyone know of ways to profile shared libraries and/or 开发者_运维技巧plugins independently of the program running them?


I've found valgrind's cachegrind with KCachegrind to be helpful in analysis of un-prepared (e.g. no gprof code embedded) binaries.

0

精彩评论

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

关注公众号