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 Jun 17 12:52, Larry Hall (Cygwin) wrote:
> 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.

I don't know how you succeeed to build that, Larry.  I could easily
reproduce the problem.  It was a build problem in Cygwin.  I fixed that
now and at the same time made the 64 bit profiling workable, curtesy the
Mingw-w64 project, which already did the required work.  The original
profiling code was created within the Cygwin project ages ago, so I
could included the latest Mingw-w64 profiling code (almost) verbatim
into Cygwin and now it seems to work fine again for 32 and 64 bit.

I'm just about to create a 2013-06-18 32 bit snapshot on
http://cygwin.com/snapshots/ and a 64 bit test release 1.7.12-5,
which both should be ready in an hour.


HTH,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
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]