| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:from:to:subject:date:message-id:references | |
| :content-type:content-transfer-encoding:mime-version; q=dns; s= | |
| default; b=YjSgrmrlTDOA5FkaiKUnBM1cOQm7t15HM4nArJ51JaYTWBwGxLEoy | |
| xK2usuejDys/2Gl8R2DRDvx9jaVFYEzhVQUxI0fD0Jzg3hhn0/RiAG+GedFfMXM+ | |
| RVNGkwjWv5uFJjxXoXE10jV7a69xCxK+J8W7PhU2VIok6KM1dZqgJY= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:from:to:subject:date:message-id:references | |
| :content-type:content-transfer-encoding:mime-version; s=default; | |
| bh=Wnq3Hm4sqDtiUN3ZOK067/BJ76A=; b=bhHy8DpHsVJKeN47L3BZJyRYCbel | |
| G3YX0GLpMOZzkWnVCdBrlghD/248cL9BtSpIidL3jrD9hSjffcnJIOVA7N1Fxs5o | |
| FzcoZbMVuT6g03b/6IbHWg6RbIXdS6RqqrtJsp1ojk6BwIWozmepuP51oKkt279v | |
| Lk3Y+Ir9529mMC8= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-Spam-SWARE-Status: | No, score=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,TW_GD autolearn=ham version=3.3.1 |
| From: | "J.B.W.Webber" <J DOT B DOT W DOT Webber AT kent DOT ac DOT uk> |
| To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
| Subject: | RE: What is a good profiling tool ? - problem with gprof |
| Date: | Mon, 17 Jun 2013 18:42:05 +0000 |
| Message-ID: | <2CF6002E09D8F54E9839DA08786D3200958D7DEC@EX10-LIVE-MBN2.ad.kent.ac.uk> |
| References: | <2CF6002E09D8F54E9839DA08786D3200958D7B7A AT EX10-LIVE-MBN2 DOT ad DOT kent DOT ac DOT uk> <51BF503E DOT 2020909 AT aol DOT com> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id r5HIgJIb024425 |
Subject: Re: What is a good profiling tool ? - problem with gprof
On 06/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 ?
>
> I have just updated cygwin. I attach cygcheck.out
>
> Or any suggestions for another profiling tool that actually reports times ?
> Cheers,
> Beau
>
If the gprof section of binutils is properly built and installed, it should satisfy the mcount reference.
It's a bit strange to make a .o with -g -pg together, particularly when you don't link with the same options.
FWIW, latest version of Intel VTune works with cygwin builds with -g3
-gdwarf-2 (and of course PATH considerations).
--
Tim Prince
_____________________
Thanks Larry and Tim,
I was not sure if -g was required as well, and tried all combinations.
May I ask if VTune works with non-MinGW compilations ?
I looked and was not clear.
I am reluctant to change my other ygwin installations, they are required for other projects.
I have certainly had interaction in the past with Altera Cygwin package and_____________________
Thanks Larry and Tim,
I was not sure if -g was required as well, and tried all combinations.
May I ask if VTune works with non-MinGW compilations ? I looked and was not clear.
I am reluctant to change my other Cygwin installations, they are required for other projects.
I have certainly had problems in the past with the Altera Cygwin package and the XMOS one interacting, but they seem to have sorted that.
Cheers,
Beau
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |