rm(1) static addition

2013-04-26 Thread Eitan Adler
Hey all, Time for attempt #2! Adding static to internal function allows the compiler to better detect dead code (functions, variables, etc) and makes it easier for the compiler to optimize; e.g., since it knows a function will only called once it can inline code; or not output a symbol for a cert

Re: rm(1) static addition

2013-04-26 Thread Otto Moerbeek
On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > Hey all, > > Time for attempt #2! > > Adding static to internal function allows the compiler to better > detect dead code (functions, variables, etc) and makes it easier for > the compiler to optimize; e.g., since it knows a function

Re: rm(1) static addition

2013-04-27 Thread Eitan Adler
On 27 April 2013 09:06, Kenneth R Westerback wrote: > On Sat, Apr 27, 2013 at 08:10:41AM +0200, Otto Moerbeek wrote: >> On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: >> >> > Hey all, >> > >> > Time for attempt #2! >> > >> > Adding static to internal function allows the compiler to b

Re: rm(1) static addition

2013-04-27 Thread Kenneth R Westerback
On Sat, Apr 27, 2013 at 09:12:21AM -0400, Eitan Adler wrote: > On 27 April 2013 09:06, Kenneth R Westerback wrote: > > On Sat, Apr 27, 2013 at 08:10:41AM +0200, Otto Moerbeek wrote: > >> On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > >> > >> > Hey all, > >> > > >> > Time for attemp

Re: rm(1) static addition

2013-04-27 Thread Kenneth R Westerback
On Sat, Apr 27, 2013 at 08:10:41AM +0200, Otto Moerbeek wrote: > On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > > > Hey all, > > > > Time for attempt #2! > > > > Adding static to internal function allows the compiler to better > > detect dead code (functions, variables, etc) and

Re: rm(1) static addition

2013-04-27 Thread Ted Unangst
On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: > On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > >> Adding static to internal function allows the compiler to better >> detect dead code (functions, variables, etc) and makes it easier for >> the compiler to optimize; e.g., since i

Re: rm(1) static addition

2013-04-27 Thread Franco Fichtner
On Apr 27, 2013, at 7:36 PM, Ted Unangst wrote: > On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: >> On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: >> >>> Adding static to internal function allows the compiler to better >>> detect dead code (functions, variables, etc) and makes

Re: rm(1) static addition

2013-04-27 Thread Otto Moerbeek
On Sat, Apr 27, 2013 at 09:09:25PM +0200, Franco Fichtner wrote: > On Apr 27, 2013, at 7:36 PM, Ted Unangst wrote: > > > On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: > >> On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > >> > >>> Adding static to internal function allows the

Re: rm(1) static addition

2013-04-27 Thread Joerg Sonnenberger
On Sat, Apr 27, 2013 at 09:09:25PM +0200, Franco Fichtner wrote: > On backtrace(3) (which is a GNU thing, I know), static functions don't > show up with their respective names even though they are in the binary. > That's a tad annoying, but I am not aware of any other limitation. Can > someone plea

Re: rm(1) static addition

2013-04-27 Thread Franco Fichtner
On Apr 27, 2013, at 9:28 PM, Joerg Sonnenberger wrote: > On Sat, Apr 27, 2013 at 09:09:25PM +0200, Franco Fichtner wrote: >> On backtrace(3) (which is a GNU thing, I know), static functions don't >> show up with their respective names even though they are in the binary. >> That's a tad annoying,

Re: rm(1) static addition

2013-04-27 Thread Tobias Ulmer
On Sat, Apr 27, 2013 at 09:14:59PM +0200, Otto Moerbeek wrote: > On Sat, Apr 27, 2013 at 09:09:25PM +0200, Franco Fichtner wrote: > > > On Apr 27, 2013, at 7:36 PM, Ted Unangst wrote: > > > > > On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: > > >> On Sat, Apr 27, 2013 at 01:08:06AM -0400, E

Re: rm(1) static addition

2013-04-27 Thread Mark Kettenis
> Date: Sat, 27 Apr 2013 13:36:31 -0400 > From: Ted Unangst > > On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote: > > On Sat, Apr 27, 2013 at 01:08:06AM -0400, Eitan Adler wrote: > > > >> Adding static to internal function allows the compiler to better > >> detect dead code (functions, variable

Re: rm(1) static addition

2013-04-27 Thread Eitan Adler
On 27 April 2013 15:38, Tobias Ulmer wrote: > On Sat, Apr 27, 2013 at 09:14:59PM +0200, Otto Moerbeek wrote: >> On Sat, Apr 27, 2013 at 09:09:25PM +0200, Franco Fichtner wrote: >> >> > On Apr 27, 2013, at 7:36 PM, Ted Unangst wrote: >> > >> > > On Sat, Apr 27, 2013 at 08:10, Otto Moerbeek wrote:

Re: rm(1) static addition

2013-04-28 Thread Marc Espie
On Sat, Apr 27, 2013 at 09:12:21AM -0400, Eitan Adler wrote: > FWIW I don't believe this sort of patch significantly affects > debugging because that should be done with -O0 -g anyways. Bwahahaha You're lucky to not run into compiler bugs that only show up with -O2. Good luck figuring THOSE out w

Re: rm(1) static addition

2013-04-28 Thread Eitan Adler
On 28 April 2013 15:25, Marc Espie wrote: > On Sat, Apr 27, 2013 at 09:12:21AM -0400, Eitan Adler wrote: >> FWIW I don't believe this sort of patch significantly affects >> debugging because that should be done with -O0 -g anyways. > > Bwahahaha > > You're lucky to not run into compiler bugs that