[PATCH] target/s390x: Fix tracing header path in TCG mem_helper.c

Philippe Mathieu-Daudé posted 1 patch 5 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240606103026.78448-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
target/s390x/tcg/mem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] target/s390x: Fix tracing header path in TCG mem_helper.c
Posted by Philippe Mathieu-Daudé 5 months, 3 weeks ago
Commit c9274b6bf0 ("target/s390x: start moving TCG-only code
to tcg/") moved mem_helper.c, but the trace-events file is
still in the parent directory, so is the generated trace.h.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Ideally we should only use trace events from current directory.
---
 target/s390x/tcg/mem_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 6a308c5553..1fb6cbb6cf 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -30,7 +30,7 @@
 #include "hw/core/tcg-cpu-ops.h"
 #include "qemu/int128.h"
 #include "qemu/atomic128.h"
-#include "trace.h"
+#include "../trace.h"
 
 #if !defined(CONFIG_USER_ONLY)
 #include "hw/s390x/storage-keys.h"
-- 
2.41.0


Re: [PATCH] target/s390x: Fix tracing header path in TCG mem_helper.c
Posted by Stefan Hajnoczi 5 months, 3 weeks ago
On Thu, Jun 06, 2024 at 12:30:26PM +0200, Philippe Mathieu-Daudé wrote:
> Commit c9274b6bf0 ("target/s390x: start moving TCG-only code
> to tcg/") moved mem_helper.c, but the trace-events file is
> still in the parent directory, so is the generated trace.h.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Ideally we should only use trace events from current directory.

Yes, that would be cleaner. Is it possible to move the relevant trace
events to the trace-events file in target/s390x/tcg/?

> ---
>  target/s390x/tcg/mem_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
> index 6a308c5553..1fb6cbb6cf 100644
> --- a/target/s390x/tcg/mem_helper.c
> +++ b/target/s390x/tcg/mem_helper.c
> @@ -30,7 +30,7 @@
>  #include "hw/core/tcg-cpu-ops.h"
>  #include "qemu/int128.h"
>  #include "qemu/atomic128.h"
> -#include "trace.h"
> +#include "../trace.h"
>  
>  #if !defined(CONFIG_USER_ONLY)
>  #include "hw/s390x/storage-keys.h"
> -- 
> 2.41.0
> 
Re: [PATCH] target/s390x: Fix tracing header path in TCG mem_helper.c
Posted by Peter Maydell 5 months, 3 weeks ago
On Thu, 6 Jun 2024 at 11:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Commit c9274b6bf0 ("target/s390x: start moving TCG-only code
> to tcg/") moved mem_helper.c, but the trace-events file is
> still in the parent directory, so is the generated trace.h.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Ideally we should only use trace events from current directory.

Mmm, I was wondering if maybe that would be the better approach.

A quick grep suggests the only other place doing a "../trace.h"
include is in include/hw/xen/interface/hvm/hvm_op.h, which is
unrelated, because it's pulling in the non-autogenerated
include/hw/xen/interface/trace.h.

-- PMM
Re: [PATCH] target/s390x: Fix tracing header path in TCG mem_helper.c
Posted by Ilya Leoshkevich 5 months, 3 weeks ago
On Thu, 2024-06-06 at 12:30 +0200, Philippe Mathieu-Daudé wrote:
> Commit c9274b6bf0 ("target/s390x: start moving TCG-only code
> to tcg/") moved mem_helper.c, but the trace-events file is
> still in the parent directory, so is the generated trace.h.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Ideally we should only use trace events from current directory.
> ---
>  target/s390x/tcg/mem_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>