What is a good profiling tool ? - problem with gprof
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Jun 18 11:00:00 GMT 2013
On Jun 18 12:11, Corinna Vinschen wrote:
> 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.
Uploaded. Please note that it's *not* enough to install the snapshot
Cygwin DLL. The important items here are gcrt0.o and libgmon.a.
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
More information about the Cygwin
mailing list