Message ID | 20230928072953.19369-1-adrian.hunter@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3322105vqu; Thu, 28 Sep 2023 06:44:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHO+wVBbzhdcqTbdZRxKhWXK+Rmmuk5H0BVnakFcWwpbl3ThPdMJtq2Rl+8VdU/tQKreoYy X-Received: by 2002:a17:902:e741:b0:1c4:1cd3:8068 with SMTP id p1-20020a170902e74100b001c41cd38068mr2020047plf.5.1695908698229; Thu, 28 Sep 2023 06:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695908698; cv=none; d=google.com; s=arc-20160816; b=w1hZeUFwZy5ICvXTk3WiBuQB/ngLoasNduH9cDDaXQHFYoZryBss9XVZwEpT21aH/v WK/CjT7dtgkMw1Rh7jTPU4qU3a9Rz9VqveQBso6HBVVJhB7EJ8FBhKMTaJmFPNHVx26x 6++SevzwKsAXzXNpQHIeQAVV/P9SzVxgwjrSr9PDlqorCQoqrJHtTGcPD5EPRRz7bMZQ c9R3S5gYyH/1O8+IlId1/OFzQxdyPFcAzjlMKEjYnubbiCAXNq93KTf6IiRSvltUUVFe NHxkCEOre5VZoiiqaLBg3QAfreCbBUCHTCd/6xqO4jGWhbphC833d06fWDbCdCcWsVRm u6mA== 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 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q6-20020a17090311c600b001c589ba4a04si19550947plh.24.2023.09.28.06.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 06:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; 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 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 231568029C7B; Thu, 28 Sep 2023 00:30:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbjI1HaJ (ORCPT <rfc822;ruipengqi7@gmail.com> + 20 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <adrian.hunter@intel.com> To: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, 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 groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 00:30:40 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778289159388945501 X-GMAIL-MSGID: 1778289159388945501 |
Series |
perf intel-pt: Fix async branch flags
|
|
Commit Message
Adrian Hunter
Sept. 28, 2023, 7:29 a.m. UTC
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 <adrian.hunter@intel.com>
---
tools/perf/util/intel-pt.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Thu, Sep 28, 2023 at 12:30 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > 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 <adrian.hunter@intel.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > --- > 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 > >
On Fri, Sep 29, 2023 at 11:40 PM Namhyung Kim <namhyung@kernel.org> wrote: > > On Thu, Sep 28, 2023 at 12:30 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > > > 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 <adrian.hunter@intel.com> > > Acked-by: Namhyung Kim <namhyung@kernel.org> Applied to perf-tools-next, thanks!
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 |