Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1224688
| Path | csiph.com!goblin1!goblin.stu.neva.ru!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | tip-bot for Jan Stancek <tipbot@zytor.com> |
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf tests: Print objdump/dso buffers if they don 't match |
| Date | Tue, 15 Sep 2015 09:00:03 +0200 |
| Message-ID | <q8SnF-5Cp-29@gated-at.bofh.it> (permalink) |
| References | <q4bqW-7Rc-21@gated-at.bofh.it> |
| X-Original-To | linux-tip-commits@vger.kernel.org |
| Reply-To | fweisbec@gmail.com, mingo@kernel.org, cjashfor@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, acme@redhat.com, paulus@samba.org, tglx@linutronix.de, jstancek@redhat.com, adrian.hunter@intel.com, dsahern@gmail.com, namhyung@kernel.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, hpa@zytor.com |
| Git-Commit-ID | fd405cf6cfddd300377bd5fd9b93d2ff66fbc32d |
| X-Mailer | tip-git-log-daemon |
| Robot-ID | <tip-bot.git.kernel.org> |
| Robot-Unsubscribe | Contact <mailto:hpa@kernel.org> to get blacklisted from these emails |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 8bit |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Disposition | inline |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 63 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | fweisbec@gmail.com, mingo@kernel.org, cjashfor@linux.vnet.ibm.com, acme@redhat.com, paulus@samba.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, jstancek@redhat.com, adrian.hunter@intel.com, dsahern@gmail.com, namhyung@kernel.org, jolsa@kernel.org, a.p.zijlstra@chello.nl, hpa@zytor.com |
| X-Original-Date | Mon, 14 Sep 2015 23:58:43 -0700 |
| X-Original-Message-ID | <tip-fd405cf6cfddd300377bd5fd9b93d2ff66fbc32d@git.kernel.org> |
| X-Original-References | <d0f42f786bc0e965918e0f422df25617a12a4021.1441181335.git.jstancek@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1224688 |
Show key headers only | View raw
Commit-ID: fd405cf6cfddd300377bd5fd9b93d2ff66fbc32d
Gitweb: http://git.kernel.org/tip/fd405cf6cfddd300377bd5fd9b93d2ff66fbc32d
Author: Jan Stancek <jstancek@redhat.com>
AuthorDate: Wed, 2 Sep 2015 10:19:17 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 14 Sep 2015 12:50:13 -0300
perf tests: Print objdump/dso buffers if they don't match
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/d0f42f786bc0e965918e0f422df25617a12a4021.1441181335.git.jstancek@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/code-reading.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 8145c67..2d21183 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -162,6 +162,18 @@ static int read_via_objdump(const char *filename, u64 addr, void *buf,
return ret;
}
+static void dump_buf(unsigned char *buf, size_t len)
+{
+ size_t i;
+
+ for (i = 0; i < len; i++) {
+ pr_debug("0x%02x ", buf[i]);
+ if (i % 16 == 15)
+ pr_debug("\n");
+ }
+ pr_debug("\n");
+}
+
static int read_object_code(u64 addr, size_t len, u8 cpumode,
struct thread *thread, struct state *state)
{
@@ -264,6 +276,10 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
/* The results should be identical */
if (memcmp(buf1, buf2, len)) {
pr_debug("Bytes read differ from those read by objdump\n");
+ pr_debug("buf1 (dso):\n");
+ dump_buf(buf1, len);
+ pr_debug("buf2 (objdump):\n");
+ dump_buf(buf2, len);
return -1;
}
pr_debug("Bytes read match those read by objdump\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[tip:perf/core] perf tests: Print objdump/dso buffers if they don 't match tip-bot for Jan Stancek <tipbot@zytor.com> - 2015-09-15 09:00 +0200
csiph-web