User forums > Using Code::Blocks

Code Profiler: Problem with gprof under WINDOWS

<< < (3/5) > >>

zak:

--- Quote ---See? You confused me too Smile
It's libgmon.a.

--- End quote ---
Sorry!!!


--- Quote ---Linking with libgmon.* should be done automagically.

It happens at least on my WinXP system at work, but the profiling does not work, or more exact, it works for me on linux, but not on WinXP (the calls are counted, but not the times).

@ zak:
libgmon.a is in <MinGW-root>/lib

--- End quote ---

We have exactely the same problem!!
How you fixed it????

Best Regards.

zak:

Who was writed Code::Profiler???

Maybe he know what happened..


Best Regards.

Biplab:
It appears to be a problem in gprof. The output from gprof doesn't contain time output. Apply the following patch and note the output at Debug Log.


--- Code: ---Index: src/plugins/contrib/profiler/cbprofilerexec.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofilerexec.cpp (revision 5094)
+++ src/plugins/contrib/profiler/cbprofilerexec.cpp (working copy)
@@ -52,6 +52,7 @@
 
     wxString cmd;
     cmd << _T("gprof ") << param << _T(" \"") << exename << _T("\" \"") << dataname << _T("\"");
+    Manager::Get()->GetLogManager()->DebugLog(cmd);
 
     wxProgressDialog progress(_("C::B Profiler plugin"),_("Launching gprof. Please wait..."));
     int pid = wxExecute(cmd, gprof_output, gprof_errors);
@@ -157,8 +158,10 @@
     while ((begin < msg.GetCount())&&(msg[begin].Find(_T("index % time")) == -1))
     {
         ++begin;
+        Manager::Get()->GetLogManager()->DebugLog(msg[begin]);
     }
     ++begin;
+    Manager::Get()->GetLogManager()->DebugLog(msg[begin]);
 
     progress.Update((100*begin)/(msg.GetCount()-1),_("Parsing Call Graph information. Please wait..."));
 

--- End code ---

irf610:
Hi,

Just ran into this problem. gprof 2.18.50 seem to have a problem. Just install gprof 2.17.50 and everything work fine.

You can find it in the Mingw GNU Bintuils release 2.17.50 at the following address :
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11290

MortenMacFly:

--- Quote from: irf610 on June 12, 2008, 07:18:42 pm ---Just ran into this problem. gprof 2.18.50 seem to have a problem. Just install gprof 2.17.50 and everything work fine.

--- End quote ---
Confirmed. :?

O dear... I already had to go back to gdb 6.6 due to bugs, now even more up-to-date binutils seem to be buggy... Darn! :(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version