qemu-devel
[Top][All Lists]
Advanced

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

Re: trace_FOO_tcg bit-rotted?


From: Laurent Vivier
Subject: Re: trace_FOO_tcg bit-rotted?
Date: Wed, 7 Apr 2021 11:08:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Le 06/04/2021 à 18:00, Alex Bennée a écrit :
> Hi,
> 
> It's been awhile since I last played with this but I think we are
> suffering from not having some test cases for tracing code
> generation/execution in the tree. I tried adding a simple trace point to
> see if I could track ERET calls:
> 
> --8<---------------cut here---------------start------------->8---
> diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> index 0b42e53500..0d643f78fe 100644
> --- a/target/arm/translate-a64.c
> +++ b/target/arm/translate-a64.c
> @@ -36,6 +36,7 @@
>  #include "exec/log.h"
>  
>  #include "trace-tcg.h"
> +#include "trace.h"
>  #include "translate-a64.h"
>  #include "qemu/atomic128.h"
>  
> @@ -2302,6 +2303,9 @@ static void disas_uncond_b_reg(DisasContext *s, 
> uint32_t insn)
>          default:
>              goto do_unallocated;
>          }
> +
> +        trace_eret_tcg(s->current_el, dst);
> +
>          if (tb_cflags(s->base.tb) & CF_USE_ICOUNT) {
>              gen_io_start();
>          }
> diff --git a/target/arm/trace-events b/target/arm/trace-events
> index 41c63d7570..2d4fca16a1 100644
> --- a/target/arm/trace-events
> +++ b/target/arm/trace-events
> @@ -1,5 +1,10 @@
>  # See docs/devel/tracing.txt for syntax documentation.
>  
> +# translate-a64.c
> +# Mode: softmmu
> +# Targets: TCG(aarch64-softmmu)
> +tcg eret(int current_el, TCGv target_el) "trans_eret: from EL%d", 
> "exec_eret: EL%d to EL%"PRId64

If I read correctly, the name should be eret_tcg()
And I'm not sure TCGv will be accepted as a parameter type, use uint64_t 
instead (and %PRIu64)

Thanks,
Laurent



reply via email to

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