[PATCH v3 09/29] plugins: Include trace/mem.h in api.c

Richard Henderson posted 29 patches 6 years, 1 month ago
Maintainers: Aleksandar Markovic <amarkovic@wavecomp.com>, Cornelia Huck <cohuck@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>
[PATCH v3 09/29] plugins: Include trace/mem.h in api.c
Posted by Richard Henderson 6 years, 1 month ago
Code movement in an upcoming patch will show that this file
was implicitly depending on trace/mem.h being included beforehand.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 plugins/api.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/api.c b/plugins/api.c
index fa1d9f276d..cb7098ce79 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -46,6 +46,8 @@
 #include "qemu/plugin-memory.h"
 #include "hw/boards.h"
 #endif
+#include "trace-root.h"
+#include "trace/mem.h"
 
 /* Uninstall and Reset handlers */
 
-- 
2.20.1


Re: [PATCH v3 09/29] plugins: Include trace/mem.h in api.c
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
Hi Richard,

On 12/29/19 12:11 AM, Richard Henderson wrote:
> Code movement in an upcoming patch will show that this file
> was implicitly depending on trace/mem.h being included beforehand.

Ah, it uses the TRACE_MEM_* macros from "trace/mem-internal.h", which is 
include by "trace/mem.h". OK.

Which part requires "trace-root.h"? Isn't it "trace/mem-internal.h" that 
should include "trace-root.h"?

> 
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   plugins/api.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/plugins/api.c b/plugins/api.c
> index fa1d9f276d..cb7098ce79 100644
> --- a/plugins/api.c
> +++ b/plugins/api.c
> @@ -46,6 +46,8 @@
>   #include "qemu/plugin-memory.h"
>   #include "hw/boards.h"
>   #endif
> +#include "trace-root.h"
> +#include "trace/mem.h"
>   
>   /* Uninstall and Reset handlers */
>   
> 


Re: [PATCH v3 09/29] plugins: Include trace/mem.h in api.c
Posted by Richard Henderson 6 years, 1 month ago
On 1/3/20 5:22 PM, Philippe Mathieu-Daudé wrote:
> Hi Richard,
> 
> On 12/29/19 12:11 AM, Richard Henderson wrote:
>> Code movement in an upcoming patch will show that this file
>> was implicitly depending on trace/mem.h being included beforehand.
> 
> Ah, it uses the TRACE_MEM_* macros from "trace/mem-internal.h", which is
> include by "trace/mem.h". OK.
> 
> Which part requires "trace-root.h"? Isn't it "trace/mem-internal.h" that should
> include "trace-root.h"?

I don't know -- perhaps it's not required at all.  I think I did a blind copy
of the trace related includes that were being removed.


r~

Re: [PATCH v3 09/29] plugins: Include trace/mem.h in api.c
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
On 1/3/20 10:59 PM, Richard Henderson wrote:
> On 1/3/20 5:22 PM, Philippe Mathieu-Daudé wrote:
>> Hi Richard,
>>
>> On 12/29/19 12:11 AM, Richard Henderson wrote:
>>> Code movement in an upcoming patch will show that this file
>>> was implicitly depending on trace/mem.h being included beforehand.
>>
>> Ah, it uses the TRACE_MEM_* macros from "trace/mem-internal.h", which is
>> include by "trace/mem.h". OK.
>>
>> Which part requires "trace-root.h"? Isn't it "trace/mem-internal.h" that should
>> include "trace-root.h"?
> 
> I don't know -- perhaps it's not required at all.  I think I did a blind copy
> of the trace related includes that were being removed.

I'v tested your series, removing "trace-root.h" from this patch and 
building next patches, and there is no problem, it is indeed not 
required at all.

Removing "trace-root.h":
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Regardless:
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>