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: 7bit 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: Mon, 17 Mar 2003 12:31:42 GMT NNTP-Posting-Host: 80.222.87.113 X-Complaints-To: abuse AT inet DOT fi X-Trace: read3.inet.fi 1047904302 80.222.87.113 (Mon, 17 Mar 2003 14:31:42 EET) NNTP-Posting-Date: Mon, 17 Mar 2003 14:31:42 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 "Alex Vinokur" wrote in message news:b54db9$252aq3$1 AT ID-79865 DOT news DOT dfncis DOT de... > ===================== > Windows 2000 > DJGPP 2.03 > GNU gcc version 3.2.1 > GNU gprof 2.13 > ===================== > > > Here is a simple program that has been profiled with using gprof. > We can see that if the program is compiled with option -O3 > then gprof's output doesn't contained called functions foo1() and foo2(). > > Any explanation ? > > > ========= C code : BEGIN ========= > /* File main.c */ > > int foo1 (int argc) { return argc; } > int foo2 (int argc) { return argc; } The optimisation -O3 inlines simple functions (like yours here). There are no calls to trace. HTH Tauno Voipio tauno voipio @ iki fi