delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/18/14:30:04

From: "Tauno Voipio" <tauno DOT voipio AT iki DOT fi DOT SPAMBAIT_REMOVE DOT invalid>
Newsgroups: comp.os.msdos.djgpp,gnu.gcc.help,gnu.utils.help
References: <b54db9$252aq3$1 AT ID-79865 DOT news DOT dfncis DOT de> <Oejda.183$Zf2 DOT 42 AT read3 DOT inet DOT fi> <b568o6$258tun$1 AT ID-79865 DOT news DOT dfncis DOT de> <b56jec$8n5$1 AT narses DOT hrz DOT tu-chemnitz DOT de>
Subject: Re: gcc -O3 & gprof
Lines: 33
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <VbKda.601$xv3.367@read3.inet.fi>
Date: Tue, 18 Mar 2003 19:11:49 GMT
NNTP-Posting-Host: 80.222.87.113
X-Complaints-To: abuse AT inet DOT fi
X-Trace: read3.inet.fi 1048014709 80.222.87.113 (Tue, 18 Mar 2003 21:11:49 EET)
NNTP-Posting-Date: Tue, 18 Mar 2003 21:11:49 EET
Organization: Sonera corp Internet services
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"André Pönitz" <poenitz AT gmx DOT net> wrote in message
news:b56jec$8n5$1 AT narses DOT hrz DOT tu-chemnitz DOT de...
> In gnu.gcc.help Alex Vinokur <alexvn AT bigfoot DOT com> wrote:
> >> The optimisation -O3 inlines simple functions (like yours here). There
are
> >> no calls to trace.
> > [snip]
> >
> > How can we see that ?
>
> By looking at the produced assembler...
>
> > For instance, nm doesn't distinguish -O0, -O1, -O2, -O3.
>
> The function definitions have to be there in case you want to access them
> from another translation unit.
>
> Try to make the functions "static". As the the functions are no longer
> accessible from the outside I'd expect the symbols to be removed
> completely.  But that's just a wild guess.
>

Right.

Also, if the functions are not 'static', there will be one copy of each
generated function for accesses from outside of the module. The internal
calls may still be inlined with nothing to trace.

Tauno Voipio
tauno voipio @ iki fi


- Raw text -


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