Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1222332imm; Tue, 5 Jun 2018 10:56:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIKv6Dn8jRQpRWewbYL5H+V1tCaX9FYZ0gthW01g16fRgpLP+FRtAEN7qv1hXxIIlB2YXsX X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr27880528pld.268.1528221361202; Tue, 05 Jun 2018 10:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221361; cv=none; d=google.com; s=arc-20160816; b=f5lX0x/ADHfcPgR+Zvan8SaCvLFYdI2IrRdicOY9HYlqFSySy2L26H+yH7gpvrOA77 fJhvrebWqbHSuo7a9MaDEd2a0zSne8wT7bRqn0t6Z3QPT2SjcfUYbfcCSxUgf7GsoXy2 sC/LXBIkF6LDJ0szbQA88SmI9JY/bIjKqjcwYVO/w0vYNaFaWU7CZneq8+E4xrluZ1N2 hF9U7LRiYpoHTYBke75N19CR0rJkLbx6gTpmfy5bYvm43RZR+Ao2tYIQ/AQjwIPxyugk 0qTUET4ZxyN/Il+AJXZD/Zf8v49TYLIo9vo5Gpcs0f48H9JWpkrRAlO6TNgdPOynjB/u umHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=cJ7xAFHNxM/LUhAKH9aRhsjfQLO7vlHwAXPE2guY0Hc=; b=A7tIrT88oZPuFqKHFSstrEgt0CumwZYAD43gROD/uRsWfNQjXmWwXDzu/TXUNmsFbY E3Y3iki6Psu7+yHWpz6gEmVEudeKaDO62imfE6cIl2fSqA6tuKGRkFPOef5hIKIbGM9d UW8AAFKVZZbUXkbM5M/Fp6Vy53vs5B4YDBg+9Ctf0z2ZN45oE4Jfb4YMC+rOmfdw6PwH AC/RD2aavKd+yCUV0lP+XvG0pFNYqr/MkGiC50XgyCz8DvOEacFT7mhGplCn8Mk1Wb0b 2aZ5WZZqVv4Axm5p8hw2yiM9o2pPgJQlS0nPJ6bIjkCuEwJdRwt6ohHRhiZDCuZLBrgw WhSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OI00RqJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19-v6si49323816pfn.241.2018.06.05.10.55.46; Tue, 05 Jun 2018 10:56:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OI00RqJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753218AbeFERxx (ORCPT + 99 others); Tue, 5 Jun 2018 13:53:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:46760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753076AbeFERws (ORCPT ); Tue, 5 Jun 2018 13:52:48 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9A6CA2077B; Tue, 5 Jun 2018 17:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528221167; bh=gRS6LeA7lVGBVeNBybCC6TrOaWcj0gS/9yXvYQsNjsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OI00RqJEuaZrVCRWt90T+ciL0ygj+L6WX+IaSfEhAqAxcPHpfTxojUhxR1MwwxF/e 1hkSiw+gUHlnBMrwuKvqOvbvnosx6A6hTmwwJ5udvJjO8mWCuSCrvm5IxDs8dmzrpf 2/oe3yG7SNkbXbVC+uLREmXvFXalTFsKgFWU8Wgk= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , stable@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 43/46] perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING Date: Tue, 5 Jun 2018 14:50:27 -0300 Message-Id: <20180605175030.32549-44-acme@kernel.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180605175030.32549-1-acme@kernel.org> References: <20180605175030.32549-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter 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 --- 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 492986a25ef6..3db7f0ee52a8 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1521,6 +1521,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); -- 2.14.3