qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
Date: Tue, 10 Jan 2017 18:47:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 10/01/2017 17:51, Eric Blake wrote:
> On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
>> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
>>> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
>>> index 43d7959..b4e50d6 100644
>>> --- a/io/channel-buffer.c
>>> +++ b/io/channel-buffer.c
>>> @@ -22,7 +22,7 @@
>>>  #include "io/channel-buffer.h"
>>>  #include "io/channel-watch.h"
>>>  #include "qemu/sockets.h"
>>> -#include "trace.h"
>>> +#include "io/trace.h"
>>
>> Is this change necessary?
> 
> Yes - now that there are more than one trace.h files spread across
> multiple directories, you need a prefix to ensure the correct one gets
> included.  In this particular case, it also matches consistency in
> including "io/channel-buffer.h" rather than just "channel-buffer.h".
> 
>>
>> I think the per-subdir trace.h file should be generated in
>> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.
> 
> It can indeed locate it, but now you are depending on -I ordering to
> make sure it locates the right one before any other wrong one, which
> feels too fragile to me.

The wrong one shouldn't be available at all.  io/channel-buffer.h is in
include/io/, while io/trace.h is in io/.  But I guess this can be
cleaned up through the whole tree later if Stefan wants to merge this
more disrupting series soon.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]