Compiled with gcc -pg, but no gmon.out produced
Michael Sanders
msanders42@gmail.com
Thu Nov 26 04:41:00 GMT 2009
Hi,
I'm having some trouble trying to profile my code. I'm just testing it
out with a simple hello world program:
$ cat bar.c
#include <stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}
However, when I compile and run it, no gmon.out is produced (as
required by gprof):
$ gcc -o bar bar.c -pg && ./bar && ls ./gmon.out
Hello, world!
ls: ./gmon.out: No such file or directory
Is there anything obvious that I'm screwing up here? I'm running this
on OS X 10.5.
Thanks.
More information about the Gcc-help
mailing list