Subject: Re: [PATCH 1/8] [TCP]: Uninline tcp_set_state

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Sat, 12 Jan 2008 19:27:48 -0200

Em Sat, Jan 12, 2008 at 01:03:55PM -0800, Stephen Hemminger escreveu:
> On Sat, 12 Jan 2008 11:40:10 +0200
> "Ilpo Järvinen" <[email-masked]> wrote:
> > -
> > -#ifdef STATE_TRACE
> > -	SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]);
> > -#endif	
> > -}
> >
> 
> 
> Since the function is called with a constant state, I guess the assumption
> was that gcc would be smart enough to only include the code needed, it looks like
> either code was bigger or the compiler was dumber than expected

Yup, that is one more instance where having proper tools to check if our
assumptions are right proves fruitful. I'm very happy for Ilpo to be
doing this work and making the case for us to work even harder on having
such tools to check if our assumptions are right.

- Arnaldo

P.S. subscribe to [email-masked] and help us produce even more
such compiler watchdogs, right now changes to the dwarves are being made
such that we can check if the layout we think is optimal really holds to
that promise :-)

Soon I'll be looking at Ulrich's promising new disasm stuff :-)

Archives: http://news.gmane.org/gmane.comp.debugging.dwarves

- Arnaldo