perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 10 Dec 2021 16:22:59 +0000 (18:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:57:13 +0000 (10:57 +0100)
commite39dd2e600399b9524b5156571c32d862754ce89
tree609a0e0c2889f22a1ffe2990c5fc207605479c38
parentd9c838b927cdc81a0e6c18609991cb0d00fe27fa
perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type

commit 4c761d805bb2d2ead1b9baaba75496152b394c80 upstream.

intel_pt_fup_event() assumes it can overwrite the state type if there has
been an FUP event, but this is an unnecessary and unexpected constraint on
callers.

Fix by touching only the state type flags that are affected by an FUP
event.

Fixes: a472e65fc490a ("perf intel-pt: Add decoder support for ptwrite and power event packets")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org # v5.15+
Link: https://lore.kernel.org/r/20211210162303.2288710-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c