From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
linux-kernel@vger.kernel.org,
Riccardo Mancini <rickyman7@gmail.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH 1/3] perf intel-pt: Fix parsing of VM time correlation arguments
Date: Wed, 15 Dec 2021 10:06:34 +0200 [thread overview]
Message-ID: <20211215080636.149562-2-adrian.hunter@intel.com> (raw)
In-Reply-To: <20211215080636.149562-1-adrian.hunter@intel.com>
Parser did not take ':' into account.
Example:
Before:
$ perf record -e intel_pt//u uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.026 MB perf.data ]
$ perf inject -i perf.data --vm-time-correlation="dry-run 123"
$ perf inject -i perf.data --vm-time-correlation="dry-run 123:456"
Failed to parse VM Time Correlation options
0x620 [0x98]: failed to process type: 70 [Invalid argument]
$
After:
$ perf inject -i perf.data --vm-time-correlation="dry-run 123:456"
$
Fixes: e3ff42bdebcfe ("perf intel-pt: Parse VM Time Correlation options and set up decoding")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/intel-pt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 10c3187e4c5a..e8613cbda331 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -3625,6 +3625,7 @@ static int intel_pt_parse_vm_tm_corr_arg(struct intel_pt *pt, char **args)
*args = p;
return 0;
}
+ p += 1;
while (1) {
vmcs = strtoull(p, &p, 0);
if (errno)
--
2.25.1
next prev parent reply other threads:[~2021-12-15 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 8:06 [PATCH 0/3] perf intel-pt: 3 more small fixes Adrian Hunter
2021-12-15 8:06 ` Adrian Hunter [this message]
2021-12-15 18:04 ` [PATCH 1/3] perf intel-pt: Fix parsing of VM time correlation arguments Namhyung Kim
2021-12-15 8:06 ` [PATCH 2/3] perf script: Fix CPU filtering of a script's switch events Adrian Hunter
2021-12-15 18:05 ` Namhyung Kim
2021-12-15 8:06 ` [PATCH 3/3] perf scripts python: intel-pt-events.py: Fix printing of " Adrian Hunter
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=20211215080636.149562-2-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=rickyman7@gmail.com \
/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
all inboxes | Powered by JetHome®