Re: [Dev-C++] Bug - Profiling [was: Profiling a proyect, how?]
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ri...@te...> - 2003-08-06 08:33:44
|
Luigi Santillo escribió: > Hello Ricardo, > > you have not specified which version of Dev-C++ your are using, > neither you tell about which profiling program you wish to use; > I will assume Dev-C++ 4.9.8.1 and gprof shipped with MinGW Gcc 3.2. Good assumption ;) > I tried myself to profile an application (using 4.9.8.1) and have > come to the conclusion that there is a bug in the options Dev-C++ > adds to the linker when you enable profiling. In fact, while it > does correctly pass the "-pg" option to the compiler, it does not > do so when linking, instead it passes the option "-lmon" (which > should mean: link against "libmon.a"), that seems useless here. Ok, well, I´m so still wondering why didn´t I take a look at the Compiler log. :( Just installed Dev-cpp 4.9.8.0 -got some problems when making a SDL 1.2.5 devpack, although finally it works! Dev-Cpp v4.9.8.0 DOES paas the -pg option to the linker. Actually profiling works flawless. But as you state, in 4.9.8.1 does not, so I also think it´s a bug. > Until the bug is fixed, a way to achieve profiling could be: > - avoid enabling the linker flags for profiling (so you won't have > the "-lmon" added to the linker flags) > - go to "Project"->"Project Options": "Parameters" tab and manually > add "-pg" to the linker flags > then, as usual, compile your application, run it (just one is enough > to create "gmon.out") and finally use "Execute->profile analysis". That was the same workaround I used, but I wanted to know if I was doing something wrong :) > If you need more information about profiling (with gprof), I suggest > reading the material found at the link: > > www.delorie.com/gnu/docs/binutils/gprof_toc.html Thanks for the link and help. Regards. -- --------------------------------------------------- Ricardo Amores Hernández ICQ: 19463735 MSN: zheo_ (at) hotmail (dot) es --------------------------------------------------- |