delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/06/17/14:07:29

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=TTZIT12ZpESup2HnjKCe78dITCbJc9E3pI2S/zXDQNW
ZQg/Ox8lBCx+tIWExkuAGGKziLT4J7bQ8p5xjX2daCKcD8RGa/aq8E2GpUb9dfhx
hmD3gGjFbTNR0phhfnNbAeVTK9S8hPr1gfqBoD2OjE7We0yuslk+7oWFb86paSsA
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=/QLPbumZWpzdIwxj54bTO6jbbfI=; b=QzlJrH0lqmQxR2axT
5bAqirwGnIQP3R+uFl6iSvFR8k3BCdqEQaOkadgOfNfyio23ALnah8L0SS/TDvOy
pACoEdOnRAVWgtW8VxEPWjtv6yj3AKQUknP5HLiskkD7bV3lKVsqszvrj9hd8f6/
xvcDJtgCnnKskJQfrQ5rMNh2A8=
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=-1.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS,TW_GD autolearn=ham version=3.3.1
Message-ID: <51BF503E.2020909@aol.com>
Date: Mon, 17 Jun 2013 14:06:54 -0400
From: Tim Prince <n8tm AT aol DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130312 Thunderbird/17.0.4
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
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>
In-Reply-To: <2CF6002E09D8F54E9839DA08786D3200958D7B7A@EX10-LIVE-MBN2.ad.kent.ac.uk>
x-aol-global-disposition: G
X-AOL-SCOLL-SCORE: 0:2:402198848:93952408
X-AOL-SCOLL-URL_COUNT: 0
x-aol-sid: 3039ac1d338351bf503f0d8f
X-AOL-IP: 69.133.204.177

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


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019