]> git.baikalelectronics.ru Git - kernel.git/commit
perf scripts python: intel-pt-events.py: Fix printing of switch events
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 15 Dec 2021 08:06:36 +0000 (10:06 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 Dec 2021 20:26:25 +0000 (17:26 -0300)
commit7270b805e6ec8c7cab8989fd8228abc9a2eb241e
tree3821b3382d4ac9fc2cd820ec557553db41b47a70
parenta23fe6f44da016a7fae3683a89fd4af18152e394
perf scripts python: intel-pt-events.py: Fix printing of switch events

The intel-pt-events.py script displays only the last of consecutive switch
statements but that may not be the last switch event for the CPU. Fix by
keeping a dictionary of last context switch keyed by CPU, and make it
possible to see all switch events by adding option --all-switch-events.

Fixes: 1b7cc51edaa0bb8a ("perf scripts python: intel-pt-events.py: Add branches to script")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211215080636.149562-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/intel-pt-events.py