linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:perf/core] x86/tools: Fix instruction decoder message output
Date: Mon, 5 Dec 2011 09:42:47 -0800	[thread overview]
Message-ID: <tip-bfbe9015de5c78d1808cd09526b9166b2e6aa440@git.kernel.org> (raw)
In-Reply-To: <20111205120545.15475.7928.stgit@cloud>

Commit-ID:  bfbe9015de5c78d1808cd09526b9166b2e6aa440
Gitweb:     http://git.kernel.org/tip/bfbe9015de5c78d1808cd09526b9166b2e6aa440
Author:     Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Mon, 5 Dec 2011 21:05:45 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 5 Dec 2011 14:53:17 +0100

x86/tools: Fix instruction decoder message output

Fix instruction decoder test (insn_sanity), so that
it doesn't show both info and error messages twice on
same instruction. (In that case, show only error message)

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20111205120545.15475.7928.stgit@cloud
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/tools/insn_sanity.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
index 334d9de..2025603 100644
--- a/arch/x86/tools/insn_sanity.c
+++ b/arch/x86/tools/insn_sanity.c
@@ -257,15 +257,14 @@ int main(int argc, char **argv)
 		insn_init(&insn, insn_buf, x86_64);
 		insn_get_length(&insn);
 
-		if (verbose && !insn_complete(&insn))
-			dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
-
 		if (insn.next_byte <= insn.kaddr ||
 		    insn.kaddr + MAX_INSN_SIZE < insn.next_byte) {
 			/* Access out-of-range memory */
 			dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn);
 			errors++;
-		}
+		} else if (verbose && !insn_complete(&insn))
+			dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);
+
 		insns++;
 	}
 

  reply	other threads:[~2011-12-05 17:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 12:05 [PATCH 0/6]x86: decoder bugfixes/updates Masami Hiramatsu
2011-12-05 12:05 ` [PATCH 1/6] [RESEND][BUGFIX] x86/tools: Fix Makefile to build all test tools Masami Hiramatsu
2011-12-05 17:41   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-12-05 12:05 ` [PATCH 2/6] [RESEND][BUGFIX] x86: Fix instruction decoder to handle grouped AVX instructions Masami Hiramatsu
2011-12-05 17:42   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-12-05 12:05 ` [PATCH 3/6] [RESEND][BUGFIX] x86/tools: Fix instruction decoder message output Masami Hiramatsu
2011-12-05 17:42   ` tip-bot for Masami Hiramatsu [this message]
2011-12-05 12:05 ` [PATCH 4/6] [RESEND][BUGFIX] x86/tools: Fix insn_sanity message outputs Masami Hiramatsu
2011-12-05 17:43   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-12-05 12:05 ` [PATCH 5/6] x86: Update instruction decoder to support new AVX formats Masami Hiramatsu
2011-12-05 17:44   ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-12-05 12:06 ` [PATCH 6/6] x86/tools: Add decoded instruction dump mode Masami Hiramatsu
2011-12-05 17:45   ` [tip:perf/core] " tip-bot for Masami Hiramatsu

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=tip-bfbe9015de5c78d1808cd09526b9166b2e6aa440@git.kernel.org \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).