Author Topic: Trables with gprof  (Read 3268 times)

Offline s79

  • Multiple posting newcomer
  • *
  • Posts: 11
Trables with gprof
« on: January 16, 2007, 02:37:23 pm »
I compile this code
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?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Trables with gprof
« Reply #1 on: January 16, 2007, 03:44:36 pm »
Did you forget "Execute TestGProf.exe"?
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline s79

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Trables with gprof
« Reply #2 on: January 17, 2007, 12:40:55 pm »
Yes.
I think troubles with MinGW? but not understand whatever.