All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Rabin Vincent <rabin.vincent@axis.com>
Cc: qemu-devel@nongnu.org, Hans-Peter Nilsson <hp@axis.com>,
	Rabin Vincent <rabinv@axis.com>
Subject: Re: [Qemu-devel] [PATCH 7/9] target-cris: ignore prefix insns in singlestep
Date: Tue, 13 Sep 2016 00:49:51 +0200	[thread overview]
Message-ID: <20160912224951.GL16305@toto> (raw)
In-Reply-To: <1473076452-19795-7-git-send-email-rabin.vincent@axis.com>

On Mon, Sep 05, 2016 at 01:54:10PM +0200, Rabin Vincent wrote:
> From: Hans-Peter Nilsson <hp@axis.com>
> 
> Don't count prefix instructions as separate when singlestepping.
> 
> For example, for this following instruction
> 
>  1ad8:       a011 e00b               move.d r0,[r1-96]
> 
> before this patch, we get two register dumps:
> 
>  PC=1ad8 CCS=0 btaken=1 btarget=1ac6
>  cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0
>  $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c
>  $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000
>  $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308
>  $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4
> 
>  PC=1ada CCS=800 btaken=1 btarget=1ac6
>  cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0
>  $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c
>  $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000
>  $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308
>  $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4
> 
> With the patch, we get only one:
> 
>  PC=1ad8 CCS=0 btaken=1 btarget=1ac6
>  cc_op=1 cc_src=3746 cc_dest=1 cc_result=ea2 cc_mask=0
>  $r0=00000000 $r1=00004360 $r2=00004308 $r3=0000026c
>  $r4=00002076 $r5=00002022 $r6=00000000 $r7=00000000
>  $r8=00000000 $r9=00000ea2 $r10=00000002 $r11=00004308
>  $r12=00001080 $r13=00000ec0 $sp=0000bfd8 $pc=00001ad4

Hi,

A concern I have is that we can't guard against all split prefix
sequences (e.g at page boundaries or with icount). So it may be more
confusing to see the prefix insns sometimes than every time.

Perhaps we should more clearly be showing prefix state in the logs?

BTW, are you guys doing post-processing on this or is it only
for human inspection?

Cheers,
Edgar


> 
> Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
> Signed-off-by: Rabin Vincent <rabinv@axis.com>
> ---
>  target-cris/translate.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/target-cris/translate.c b/target-cris/translate.c
> index a4512b5..c9b1e65 100644
> --- a/target-cris/translate.c
> +++ b/target-cris/translate.c
> @@ -3262,7 +3262,8 @@ void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb)
>          }
>      } while (!dc->is_jmp && !dc->cpustate_changed
>              && !tcg_op_buf_full()
> -            && !singlestep
> +            /* We don't count prefix insns as separate wrt. singlestep.  */
> +            && (!singlestep || (dc->tb_flags & PFIX_FLAG))
>              && (dc->pc < next_page_start)
>              && num_insns < max_insns);
>  
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-09-12 22:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 11:54 [Qemu-devel] [PATCH 1/9] tests: cris: force inlining Rabin Vincent
2016-09-05 11:54 ` [Qemu-devel] [PATCH 2/9] tests: cris: fix syscall inline asm Rabin Vincent
2016-09-05 18:20   ` Richard Henderson
2016-09-08 11:38     ` [Qemu-devel] [PATCHv2 2/8] " Rabin Vincent
2016-09-08 16:10       ` Richard Henderson
2016-09-05 11:54 ` [Qemu-devel] [PATCH 3/9] tests: cris: remove openpf4 test Rabin Vincent
2016-09-12 22:51   ` Edgar E. Iglesias
2016-09-05 11:54 ` [Qemu-devel] [PATCH 4/9] tests: cris: remove check_time1 Rabin Vincent
2016-09-12 23:00   ` Edgar E. Iglesias
2016-09-05 11:54 ` [Qemu-devel] [PATCH 5/9] target-cris: sync CC state at load/stores Rabin Vincent
2016-09-05 19:02   ` Richard Henderson
2016-09-06 21:52     ` Edgar E. Iglesias
2016-09-05 11:54 ` [Qemu-devel] [PATCH 6/9] target-cris: reduce v32isms from v10 log dumps Rabin Vincent
2016-09-12 22:59   ` Edgar E. Iglesias
2016-09-14 12:48     ` Hans-Peter Nilsson
2016-09-26  7:06     ` Rabin Vincent
2016-09-05 11:54 ` [Qemu-devel] [PATCH 7/9] target-cris: ignore prefix insns in singlestep Rabin Vincent
2016-09-12 22:49   ` Edgar E. Iglesias [this message]
2016-09-14 13:32     ` Hans-Peter Nilsson
2016-09-05 11:54 ` [Qemu-devel] [PATCH 8/9] target-cris: add v17 CPU Rabin Vincent
2016-09-12 22:18   ` Edgar E. Iglesias
2016-09-26  7:17     ` Rabin Vincent
2016-09-28 10:42       ` Edgar E. Iglesias
2016-09-30 16:50         ` Rabin Vincent
2016-09-05 11:54 ` [Qemu-devel] [PATCH 9/9] tests: cris: add v17 ADDC test Rabin Vincent
2016-09-12 23:16   ` Edgar E. Iglesias
2016-09-06 21:53 ` [Qemu-devel] [PATCH 1/9] tests: cris: force inlining Edgar E. Iglesias
2016-09-08 11:41   ` Rabin Vincent
2016-09-08 18:06 ` Peter Maydell
2016-09-08 18:21   ` Eric Blake
2016-09-12  9:43   ` [Qemu-devel] [PATCHv2 1/8] " Rabin Vincent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160912224951.GL16305@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=hp@axis.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rabin.vincent@axis.com \
    --cc=rabinv@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.