[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-bfbe9015de5c78d1808cd09526b9166b2e6aa440@git.kernel.org>
Date: Mon, 5 Dec 2011 09:42:47 -0800
From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
masami.hiramatsu.pt@...achi.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] x86/tools: Fix instruction decoder message output
Commit-ID: bfbe9015de5c78d1808cd09526b9166b2e6aa440
Gitweb: http://git.kernel.org/tip/bfbe9015de5c78d1808cd09526b9166b2e6aa440
Author: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
AuthorDate: Mon, 5 Dec 2011 21:05:45 +0900
Committer: Ingo Molnar <mingo@...e.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@...achi.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: yrl.pp-manager.tt@...achi.com
Link: http://lkml.kernel.org/r/20111205120545.15475.7928.stgit@cloud
Signed-off-by: Ingo Molnar <mingo@...e.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++;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists