delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/17/08:04:09

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>
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: <Oejda.183$Zf2.42@read3.inet.fi>
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" <alexvn AT bigfoot DOT com> 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


- Raw text -


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