This is the mail archive of the
mailing list for the Cygwin project.
Re: What is a good profiling tool ? - problem with gprof
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 17 Jun 2013 12:52:16 -0400
- Subject: Re: What is a good profiling tool ? - problem with gprof
- References: <2CF6002E09D8F54E9839DA08786D3200958D7B7A at EX10-LIVE-MBN2 dot ad dot kent dot ac dot uk>
- Reply-to: cygwin at cygwin dot com
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 */
$ 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.
> 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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple