From: tip-bot for Stefano Sanfilippo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, peterz@infradead.org, namhyung@kernel.org,
jolsa@redhat.com, mingo@kernel.org, anton@ozlabs.org,
linux-kernel@vger.kernel.org, rmcilroy@chromium.org,
hpa@zytor.com, eranian@google.com, tglx@linutronix.de,
ssanfilippo@chromium.org
Subject: [tip:perf/core] perf jit: Make perf skip unknown records
Date: Mon, 24 Oct 2016 11:59:37 -0700 [thread overview]
Message-ID: <tip-7354ec7a86c0cc03bebb7f86af8f20a88b27c262@git.kernel.org> (raw)
In-Reply-To: <1476356383-30100-5-git-send-email-eranian@google.com>
Commit-ID: 7354ec7a86c0cc03bebb7f86af8f20a88b27c262
Gitweb: http://git.kernel.org/tip/7354ec7a86c0cc03bebb7f86af8f20a88b27c262
Author: Stefano Sanfilippo <ssanfilippo@chromium.org>
AuthorDate: Thu, 13 Oct 2016 03:59:38 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 24 Oct 2016 11:07:38 -0300
perf jit: Make perf skip unknown records
The behavior before this commit was to skip the remaining portion of the
jitdump in case an unknown record was found, including those records
that perf could handle.
With this change, parsing a record with an unknown id will cause a
warning to be emitted, the record will be skipped and parsing will
resume from the next (valid) one.
The patch aims at making perf more future proof, by extracting as much
information as possible from jitdumps.
Signed-off-by: Stefano Sanfilippo <ssanfilippo@chromium.org>
Signed-off-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: Anton Blanchard <anton@ozlabs.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1476356383-30100-5-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/jitdump.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index f3ed3c9..75b66bb 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -263,8 +263,7 @@ jit_get_next_entry(struct jit_buf_desc *jd)
return NULL;
if (id >= JIT_CODE_MAX) {
- pr_warning("next_entry: unknown prefix %d, skipping\n", id);
- return NULL;
+ pr_warning("next_entry: unknown record type %d, skipping\n", id);
}
if (bs > jd->bufsize) {
void *n;
@@ -322,7 +321,8 @@ jit_get_next_entry(struct jit_buf_desc *jd)
break;
case JIT_CODE_MAX:
default:
- return NULL;
+ /* skip unknown record (we have read them) */
+ break;
}
return jr;
}
next prev parent reply other threads:[~2016-10-24 19:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 10:59 [PATCH 0/9] perf/jit: various improvements Stephane Eranian
2016-10-13 10:59 ` [PATCH 1/9] perf/jit: improve error messages from JVMTI Stephane Eranian
2016-10-13 20:05 ` Nilay Vaish
2016-10-14 11:13 ` Arnaldo Carvalho de Melo
2016-10-14 12:57 ` Stephane Eranian
2016-10-14 15:20 ` Arnaldo Carvalho de Melo
2016-10-17 13:52 ` Stephane Eranian
2016-10-24 18:58 ` [tip:perf/core] perf jit: Improve " tip-bot for Stephane Eranian
2016-10-13 10:59 ` [PATCH 2/9] perf/jit: enable jitdump support without dwarf Stephane Eranian
2016-10-13 18:16 ` Arnaldo Carvalho de Melo
2016-10-13 18:37 ` Arnaldo Carvalho de Melo
2016-10-13 18:51 ` Arnaldo Carvalho de Melo
2016-10-13 19:03 ` Arnaldo Carvalho de Melo
2016-10-13 19:44 ` Arnaldo Carvalho de Melo
2016-10-24 18:58 ` [tip:perf/core] perf jit: Enable " tip-bot for Maciej Debski
2016-10-13 10:59 ` [PATCH 3/9] perf/jit: remove unecessary padding in jitdump file Stephane Eranian
2016-10-24 18:59 ` [tip:perf/core] perf jit: Remove " tip-bot for Stephane Eranian
2016-10-13 10:59 ` [PATCH 4/9] perf/jit: make perf skip unknown records Stephane Eranian
2016-10-24 18:59 ` tip-bot for Stefano Sanfilippo [this message]
2016-10-13 10:59 ` [PATCH 5/9] perf/jit: do not assume pgoff is zero Stephane Eranian
2016-10-24 19:00 ` [tip:perf/core] perf jit: Do " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 6/9] perf/jit: add unwinding support Stephane Eranian
2016-10-24 19:00 ` [tip:perf/core] perf jit: Add " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 7/9] perf/jit: generate .eh_frame/.eh_frame_hdr in DSO Stephane Eranian
2016-10-24 19:01 ` [tip:perf/core] perf jit: Generate " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 8/9] perf/jit: Check JITHEADER_VERSION Stephane Eranian
2016-10-24 19:01 ` [tip:perf/core] perf jit: " tip-bot for Stefano Sanfilippo
2016-10-13 10:59 ` [PATCH 9/9] perf/jit: add jitdump format specification document Stephane Eranian
2016-10-24 19:02 ` [tip:perf/core] perf jit: Add " tip-bot for Stephane Eranian
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-7354ec7a86c0cc03bebb7f86af8f20a88b27c262@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=anton@ozlabs.org \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rmcilroy@chromium.org \
--cc=ssanfilippo@chromium.org \
--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 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.