diff mbox series

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

Message ID 20191228231124.18307-10-richard.henderson@linaro.org
State New
Headers show
Series cputlb: Remove support for MMU_MODE*_SUFFIX | expand

Commit Message

Richard Henderson Dec. 28, 2019, 11:11 p.m. UTC
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(+)

Comments

Philippe Mathieu-Daudé Jan. 3, 2020, 6:22 a.m. UTC | #1
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 */
>   
>
Richard Henderson Jan. 3, 2020, 9:59 p.m. UTC | #2
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~
Philippe Mathieu-Daudé Jan. 4, 2020, 11:52 a.m. UTC | #3
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>
diff mbox series

Patch

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 */