[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7ciipw--44hKt3-K693L+0eFY_c=J=WKJ2N+NV+Yo2=-4A@mail.gmail.com>
Date: Wed, 15 Dec 2021 10:04:47 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Riccardo Mancini <rickyman7@...il.com>
Subject: Re: [PATCH 1/3] perf intel-pt: Fix parsing of VM time correlation arguments
Hi Adrian,
On Wed, Dec 15, 2021 at 12:07 AM Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> 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@...r.kernel.org
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Thanks,
Namhyung
> ---
> 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
>
Powered by blists - more mailing lists