]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Fix parsing of VM time correlation arguments
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 15 Dec 2021 08:06:34 +0000 (10:06 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 Dec 2021 20:26:25 +0000 (17:26 -0300)
commitbdef39baab2e1924ed639d7e8c1f3b10a6c7d4ca
tree90af02feebd6b9300643ae8e1d84736bb34c8beb
parentac4024f43f919bda181f7a3d3871e67891308684
perf intel-pt: Fix parsing of VM time correlation arguments

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: 008c25559e9b4875 ("perf intel-pt: Parse VM Time Correlation options and set up decoding")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211215080636.149562-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt.c