Author Topic: profiling a plugin  (Read 5548 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
profiling a plugin
« on: April 22, 2012, 09:20:05 pm »
Hi everybody,

after spending some time searching the forum and viewing the gprof page, I finally post here, because I can't seem do what I want.

My problem is that I want to profile a plugin for code::blocks. But only the plugin, nothing else. Specially code::blocks itself I don't want to profile. Just my non-contrib plugin.

What I did so far was setting -pg flag to the src target of c::b and to my plugin. This does give me a gmon.out file, but it isn't quit what I want. All c::b's profile information shows up as well (as to be supposed) and it is very difficult to sort out what is from the plugin and what not.

Is there a way that I can only set the -pg flag on the plugin and run c::b , make the plugin do what it should do and get an output file from that, only showing the plugin data?

Regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: profiling a plugin
« Reply #1 on: April 22, 2012, 09:35:26 pm »
Read the docs of gprof and you'll find that it doesn't support shared libraries, sorry, you have to use some other tool.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: profiling a plugin
« Reply #2 on: April 23, 2012, 06:08:07 pm »
OK, I must have overlooked that one.

I tried sprof, but it turns out to have a problem with the gclib. It seems it is not being developed anymore either.

How do you developer guys do profiling for your code::blocks plugins? Or is it that you just don't mind?

Regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: profiling a plugin
« Reply #3 on: April 23, 2012, 07:03:36 pm »
You can try to use oprofile, but it was too complex for me.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: profiling a plugin
« Reply #4 on: April 23, 2012, 07:50:08 pm »
OK, then I'm not ashamed of having given up on oprofile myself too. On my system I would have had to change the watchdog settings of the kernel to even make oprofile work ... I surrendered. The features sounded impressive though. Maybe some day one of the real developers here (I mean not someone like me) will pick up the glove.
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100