xfs
[Top] [All Lists]

Re: Warnings when compiling xfs_macros.c

To: Steve Lord <lord@xxxxxxx>
Subject: Re: Warnings when compiling xfs_macros.c
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 8 Sep 2005 15:14:47 +0100
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Craig Rodrigues <rodrigc@xxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <43204609.60203@xxxxxxx>
References: <20050907174535.GA1850@xxxxxxxxxxxxxx> <20050907182059.GA13074@xxxxxxxxxxxxx> <20050907184542.GA2316@xxxxxxxxxxxxxx> <20050908105745.GA5847@xxxxxxxxxxxxx> <43204609.60203@xxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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---


<Prev in Thread] Current Thread [Next in Thread>