Re: [patch 1/3] move WARN_ON() out of line

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeremy Fitzhardinge <jeremy@...>
Cc: <linux-kernel@...>, Ingo Molnar <mingo@...>, Andrew Morton <akpm@...>
Date: Saturday, January 5, 2008 - 2:01 pm

Jeremy Fitzhardinge wrote:

I just did an experiment with this to see how much is on the table. I made
a file with 1024 WARN_ON()'s (new style, eg the out of line call) and 1024 BUG_ON()'s,
which on i386 already use the trap.
This shows that the BUG_ON() case is 2Kb shorter in generated code. From this 2Kb you
need to subtract all the code size that is needed to deal with the trap and the module
merging/unmerging of trap points etc etc, so lets say that a total of 1Kb is left on the table.
HOWEVER, if you have a module with, say, only 4 WARN_ON()/BUG_ON()'s, you actually LOOSE
48 bytes, because of the extra overhead of how the trap data is stored.

So... call me unconvinced for now. There's 30 Kb on the table with the easy, obviously safe
transform, and maybe another 1Kb with the much more tricky trapping scenario, but only
for the vmlinux case; the module case seems to be a loss instead.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Wed Jan 2, 8:56 pm)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:41 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:01 pm)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:45 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 4:02 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:08 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:37 pm)
Re: [patch 1/3] move WARN_ON() out of line, Dmitri Vorobiev, (Sat Jan 5, 1:09 am)
Re: [patch 1/3] move WARN_ON() out of line, Pekka Enberg, (Thu Jan 3, 7:20 am)
Re: [patch 1/3] move WARN_ON() out of line, Ingo Molnar, (Thu Jan 3, 5:25 am)
Re: [patch 1/3] move WARN_ON() out of line, Jeremy Fitzhardinge, (Sat Jan 5, 2:42 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 12:22 pm)
Re: [patch 1/3] move WARN_ON() out of line, Olof Johansson, (Thu Jan 3, 12:58 am)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 5:03 pm)
Re: [patch 1/3] move WARN_ON() out of line, Matt Mackall, (Wed Jan 2, 9:59 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Thu Jan 3, 5:06 pm)
Re: [patch 1/3] move WARN_ON() out of line, Herbert Xu, (Fri Jan 4, 10:35 pm)
Re: [patch 1/3] move WARN_ON() out of line, Arjan van de Ven, (Sat Jan 5, 2:33 pm)