A good free profiler that supports MingW32, please?

I asked in another thread how to profile my things, and people gave me a lot of good answers, except when I tried to use several free profilers, including AMD Codeanalyst, for example, they only support Microsoft PDB format and MingW cannot generate them.

So, which profiler can help me profile a multithreaded application using Lua scripts and compiled using MingW?

EDIT: gprof is shit, a shadow that says why I don’t want it, right on the spot ... If I get all the functions that it will exist as troublesome, None of them are related to the problem, I (have a certain action that causes a significant slowdown, and I can’t understand why, and gprof cannot understand it either)

+1
source share
3 answers

If you do not want to use gprof , I am not surprised .

It took me a while to figure out how to do this in GDB, but here's what I do. Launch the application and change the focus to the application output window, even if it is only a DOS field. Then I press the Control-Break key (while it's slow). Then GDB stops and I make information flows , and it tells me which flows are usually 1 and 2. I switch to the thread that I want, like thread 2 . Then I do bt to see the stack trace. This tells me exactly what he was doing when I pressed Control-Break. I do this several times, for example 10 or 20, and if there is a performance problem, no matter what it is, it is displayed on several samples of the stack. The slower he makes the program, the fewer samples I have to make before I see it.

For a complete analysis of how and why it works, see this link.

PS I also execute the SIGINT descriptor stop print nopass when starting GDB.

+4
source

Does gprof not do this?

I thought MingW provided the gprof version for this.

+2
source

If you want to profile Lua scripts, I could suggest using LuaProfiler: http://luaprofiler.luaforge.net/manual.html . It works very well.

I would highly recommend introducing some kind of timers or your own profiler to get a simple profiling tool. Very simple - just print the time when certain points in your code come across, output them to a text file, and then write a simple lua or python script to analyze the file and filter interesting information.

I used this (or somewhat more complicated) version of profiling for most of my hobby projects, and it turned out to be very useful.

0
source

All Articles