From: Adrian Hunter Date: Thu, 31 May 2018 10:23:42 +0000 (+0300) Subject: perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING X-Git-Tag: v4.9.111~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31606f7f56de573470f0b7037b764df381a87fa6;p=platform%2Fkernel%2Flinux-amlogic.git perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING commit dbcb82b93f3e8322891e47472c89e63058b81e99 upstream. sync_switch is a facility to synchronize decoding more closely with the point in the kernel when the context actually switched. In one case, INTEL_PT_SS_NOT_TRACING state was not correctly transitioning to INTEL_PT_SS_TRACING state due to a missing case clause. Add it. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1527762225-26024-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index b1161d7..5fb78b6 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1344,6 +1344,7 @@ static int intel_pt_sample(struct intel_pt_queue *ptq) if (intel_pt_is_switch_ip(ptq, state->to_ip)) { switch (ptq->switch_state) { + case INTEL_PT_SS_NOT_TRACING: case INTEL_PT_SS_UNKNOWN: case INTEL_PT_SS_EXPECTING_SWITCH_IP: err = intel_pt_next_tid(pt, ptq);