This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What is a good profiling tool ? - problem with gprof


On 6/17/2013 12:19 PM, J.B.W.Webber wrote:
Hi, I am trying to find in which function call the most time is being spent.

I am using gcc and trying to compile and link with -g and -pg.
i.e. for a trivial test :

$ cat helloworld.c
/* Hello World program */
#include<stdio.h>
main()
{
     printf("Hello World\n");
}

$ gcc -g -pg -c helloworld.c
$ gcc -pg helloworld.o
helloworld.o: In function `main':
helloworld.c:6: undefined reference to `_mcount'
collect2: ld returned 1 exit status

Any ideas ? Am I missing a .h call ? Or do I need to link to something ?

Worked for me.  Perhaps your Strawberry gcc installation is interfering.

--
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]