dynamic linking - How to profile a shared object without profiling the host app? -


I have a host application and I wrote a plug-in I compiled my plug-in with a shared object (I say foo.so), and the host application will load it via Dluppen. In this case, my host application is an opt-in tool from LLVM (though I do not think it is important for the question).

I want to enable my plug-in with profiling (i.e. G ++ -PG , gprof ). However, when I do this, the profile output file gmon.out has never been created. Maybe GPRF expects someone to make a setup routine, or something like this.

For various reasons, I would like to avoid re-combating the host app with -gpg. I'm curious if it is possible to profile a shared object foo.so without choosing the host application.

I have also seen in other profiling tools; Qprof should be able to handle this situation from HP, but it is unable to resolve the function names in the shared object (it returns back to the addr2line in a very intuitive way).

Thanks, Nick

I think you want to do this To find ways to optimize the plugin (just unlike time info).

Can you run the host app under a debugger or IDE? Is the IDE a punctuation button or can you interrupt it with Ctrl-C or some such key?

Then you can get expensive codes by using it immediately. When your plugins are running, only take samples, or if you can not do this, only ignore the specimens that do not end in your plug-ins.

Even if you get gprof work or similar profiler,.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -