On Thu, Sep 08, 2005 at 09:09:13AM -0500, Steve Lord wrote:
> I can give you some history on this if it helps
>
> There were a couple of reasons for the functions vs macros thing (it
> predates me too, so don't blame me for the code ;-).
>
> 1. Being able to compile as functions meant breakpoints could be
> used in the code. I do not remember the last time that happened.
Note that recent gdb (with DWARF2 support) allow stepping through macros,
and they'll probably allow breakpoints aswell (not sure though)
> 2. There were some Irix platforms with more limited kernel address
> spaces, for these, a tradeoff was made between speed (inline code
> via a macro), and the space it used. Apart from embedded systems
> which might want to use XFS for some reason, I suspect this is no
> longer an issue, I do not have a good feel for what the smallest
> XFS code size vs the biggest might be.
>
> If someone converts all the code to plain macros, I suggest you look
> carefully at the ones which default to being functions, these are
> probably the main culprits when it comes to code bloat. With today's
> fast cpus, keeping them as functions might still be worth while
> from a code size point of view.
Keeping those in their current from makes sense indeed. Long-term it
would also be nice to lose the horrible upper-case names for these that
are now functions, but that's a completely unrelated cleanup.
>
> Steve
---end quoted text---
|