News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Trables with gprof

Started by s79, January 16, 2007, 02:37:23 PM

Previous topic - Next topic

s79

I compile this code

#include <stdlib.h>
void a(void);
void b();

int main()
{
a();
b();
return 0;
}

void a(void)
{
    _sleep(200);
    return;
}
void b()
{
    int i;
    for(i=1;i<10;i++)
    {
        a();
    }
}

build with command

mingw32-g++.exe -Wall -pg -g  -ID:\Utils\Lang\MinGW\include  -c main.c -o obj\Debug\main.o
mingw32-g++.exe -LD:\Utils\Lang\MinGW\lib  -o .\TestGProf.exe obj\Debug\main.o   -pg -lgmon 

run plug-in "Code profiler" and get only:

File `G:\Project\TestGProf\gmon.out' (version 0) contains:
   1 histogram record
   3 call-graph records
   0 basic-block count records

other windows blank.
What's wrong?

TDragon

Did you forget "Execute TestGProf.exe"?
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

s79

Yes.
I think troubles with MinGW? but not understand whatever.