From: "Tauno Voipio" Newsgroups: comp.os.msdos.djgpp,gnu.gcc.help,gnu.utils.help References: Subject: Re: gcc -O3 & gprof Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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: 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" wrote in message news:b56jec$8n5$1 AT narses DOT hrz DOT tu-chemnitz DOT de... > In gnu.gcc.help Alex Vinokur 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