Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3076616rdh; Thu, 28 Sep 2023 01:38:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwEv7JTwST1yDF4nyUhs2ittAI2rEN2zcHoFd0n9Rpmmm2vPoJiogvCWI/FnjVn3aKp803 X-Received: by 2002:a05:6a00:4c10:b0:68a:6d34:474b with SMTP id ea16-20020a056a004c1000b0068a6d34474bmr994714pfb.15.1695890280986; Thu, 28 Sep 2023 01:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695890280; cv=none; d=google.com; s=arc-20160816; b=DZIJmN04TDkmuIz44B1RRufYpFFMMuu0bWWVKFVOa3xXfS6q6RujFSLBJLNHQ2sCCa Kb+etnZOuk9NBypdOGhkHBHTs7ERvFwO/8UDoiqZod9cJhCPyrILpIx3YrQXB3gXN5Jy AAreEyZM9ibvDnXMUoPmDLtIQ9UHcaDlCTUBHA15q9XQ5QM/caK+LX2ZCgguIO4VLQXh didDS8Gtr6j97NB1cuUXdv4vwDo4ZgtZ1ozBwFVlm1CALGaZkT9UeFBOaFga70KvEGob VaeehkCZOv2SDoLNFNCmycHkgowvv7m0JeOv/Txvm4LUz4YEieCTJOxNBO/5EHiL7ahC pbUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=aLBdQJ2D0AIe2X0/azXwPxYt6bwOv3B30KJYFaaBFUs=; fh=7ueK1huCq2Lf3LMjc8i3Ob70zhQl+8ZRdqYzG6swRYY=; b=IClXgBytEpZH/RXzrzWjbAH21OY1zXGsdKizGsd7Zxr/Hi0UvrjLe85PORKD4f8sPn Mxtu8fB4TF+eROpOLjcFODixj930C+Nk1YufXCNy2WU70UOKpMoy53dZlc0I1CsDZiPb QqUx8E4+STZGYxhBRDKnuzrvP2KRWNnlZsgH16XPD7w3/j96MC4KGRziUq7Bez6tVLTP F4+IpswejVeySF5ll1kPZvArGFnLpjIqt6nC0CV4/0fBz2b3/vDYEuJsDFPE+Ut/6MpC c3EOdvQAuQE7kQVvrHHNuyCYYYI2zZnsGq0RmIdcMwIM0wiKxcsxrOpfU3ifyd0aRFxP W3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DhQZiUxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v21-20020a056a00149500b0068ffda29587si20007389pfu.109.2023.09.28.01.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 01:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DhQZiUxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7B8478095DD0; Thu, 28 Sep 2023 00:30:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbjI1HaJ (ORCPT + 99 others); Thu, 28 Sep 2023 03:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjI1HaH (ORCPT ); Thu, 28 Sep 2023 03:30:07 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB24395; Thu, 28 Sep 2023 00:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695886205; x=1727422205; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LldhkKAdq6Uhrl+Pp3Hvrn4yVWHOe1C4Lda2TarY/cI=; b=DhQZiUxxLxWc14x9ydjlEOf4iQPzPIKQ7ie33vlGynjWYFXnV2wi9Vns Kv0Ocy+CbEL60KhqB7nSc6z+2zKwWGWOKUBYawE227gRx1AmzL9KdVabw Xv8G4o4j3VjC1ZfnBLO9bfFhVcNDXbFvJoJo/Uhj2YIepPj6Q5uwyzvXt gwioUUxXtPNF7ed12dK5Y9T+IGXInQHB3rnmMGWLAn4vPJqb8iGmT7Nr8 VKSy9XjXjlwgQiwh/q/64MCv8p0lEfONncsHEwwuj4f4ZsXJMJ5I5V852 3dUe8CiJZgCut/JxqJT+7sZDyP8Dojbh8+Eu8uuhki7+My4q/RuudLIKe g==; X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="362246118" X-IronPort-AV: E=Sophos;i="6.03,183,1694761200"; d="scan'208";a="362246118" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 00:30:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="996463465" X-IronPort-AV: E=Sophos;i="6.03,183,1694761200"; d="scan'208";a="996463465" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.53.62]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 00:30:03 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH] perf intel-pt: Fix async branch flags Date: Thu, 28 Sep 2023 10:29:53 +0300 Message-Id: <20230928072953.19369-1-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 00:30:31 -0700 (PDT) Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e. interrupts etc). Fixes: 90e457f7be08 ("perf tools: Add Intel PT support") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index dbf0bc71a63b..f38893e0b036 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1512,9 +1512,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) } else if (ptq->state->flags & INTEL_PT_ASYNC) { if (!ptq->state->to_ip) ptq->flags = PERF_IP_FLAG_BRANCH | + PERF_IP_FLAG_ASYNC | PERF_IP_FLAG_TRACE_END; else if (ptq->state->from_nr && !ptq->state->to_nr) ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | + PERF_IP_FLAG_ASYNC | PERF_IP_FLAG_VMEXIT; else ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | -- 2.34.1