All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 7/7] target-s390x: Tidy cpu_dump_state
Date: Wed, 26 Sep 2012 00:45:40 +0200	[thread overview]
Message-ID: <20120925224540.GG23819@ohm.aurel32.net> (raw)
In-Reply-To: <1348523753-25083-8-git-send-email-rth@twiddle.net>

On Mon, Sep 24, 2012 at 02:55:53PM -0700, Richard Henderson wrote:
> The blank lines inside the single dump make it difficult for the
> eye to pick out the block.  Worse, with interior newlines, but
> no blank line following, the PSW line appears to belong to the
> next dump block.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  target-s390x/translate.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/target-s390x/translate.c b/target-s390x/translate.c
> index 4cc9225..db464cc 100644
> --- a/target-s390x/translate.c
> +++ b/target-s390x/translate.c
> @@ -79,6 +79,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf,
>  {
>      int i;
>  
> +    if (env->cc_op > 3) {
> +        cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n",
> +                    env->psw.mask, env->psw.addr, cc_name(env->cc_op));
> +    } else {
> +        cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n",
> +                    env->psw.mask, env->psw.addr, env->cc_op);
> +    }
> +
>      for (i = 0; i < 16; i++) {
>          cpu_fprintf(f, "R%02d=%016" PRIx64, i, env->regs[i]);
>          if ((i % 4) == 3) {
> @@ -97,8 +105,6 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf,
>          }
>      }
>  
> -    cpu_fprintf(f, "\n");
> -
>  #ifndef CONFIG_USER_ONLY
>      for (i = 0; i < 16; i++) {
>          cpu_fprintf(f, "C%02d=%016" PRIx64, i, env->cregs[i]);
> @@ -110,22 +116,14 @@ void cpu_dump_state(CPUS390XState *env, FILE *f, fprintf_function cpu_fprintf,
>      }
>  #endif
>  
> -    cpu_fprintf(f, "\n");
> -
> -    if (env->cc_op > 3) {
> -        cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n",
> -                    env->psw.mask, env->psw.addr, cc_name(env->cc_op));
> -    } else {
> -        cpu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n",
> -                    env->psw.mask, env->psw.addr, env->cc_op);
> -    }
> -
>  #ifdef DEBUG_INLINE_BRANCHES
>      for (i = 0; i < CC_OP_MAX; i++) {
>          cpu_fprintf(f, "  %15s = %10ld\t%10ld\n", cc_name(i),
>                      inline_branch_miss[i], inline_branch_hit[i]);
>      }
>  #endif
> +
> +    cpu_fprintf(f, "\n");
>  }
>  
>  static TCGv_i64 psw_addr;
> -- 
> 1.7.11.4

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2012-09-25 22:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 21:55 [Qemu-devel] [PATCH 0/7] Tidy -d op_opt,int,cpu Richard Henderson
2012-09-24 21:55 ` [Qemu-devel] [PATCH 1/7] Emit debug_insn for CPU_LOG_TB_OP_OPT as well Richard Henderson
2012-09-25 22:44   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 2/7] target-m68k: Call tcg_gen_debug_insn_start Richard Henderson
2012-09-25 22:44   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 3/7] target-s390x: " Richard Henderson
2012-09-25 22:44   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 4/7] target-unicore32: " Richard Henderson
2012-09-25 22:45   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 5/7] target-s390x: Use CPU_LOG_INT Richard Henderson
2012-09-25 22:45   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 6/7] target-s390x: Avoid double CPU_LOG_TB_CPU Richard Henderson
2012-09-25 22:45   ` Aurelien Jarno
2012-09-24 21:55 ` [Qemu-devel] [PATCH 7/7] target-s390x: Tidy cpu_dump_state Richard Henderson
2012-09-25 22:45   ` Aurelien Jarno [this message]
2012-09-25  7:40 ` [Qemu-devel] [PATCH 0/7] Tidy -d op_opt,int,cpu Alexander Graf
2012-09-27 19:47 ` Aurelien Jarno

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=20120925224540.GG23819@ohm.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.