From patchwork Sat Oct 22 07:29:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1109276wrr; Sat, 22 Oct 2022 01:47:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7dx4HdaKRY5u7AClAxEKhIjCV9gXGARduwZ6g1hBdxpdk5Kw+m8L2TKGnl2X6lXkICebuF X-Received: by 2002:a17:907:25cd:b0:77b:9672:38e7 with SMTP id ae13-20020a17090725cd00b0077b967238e7mr20022882ejc.10.1666428472260; Sat, 22 Oct 2022 01:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428472; cv=none; d=google.com; s=arc-20160816; b=c/tBg3L+b/Bc1QAl3FAxsVQ6SlFBFs6Sw8MqYYRd5nt+WSnotbmJIk9vRPPPgVccDA 4SfadcY0VDpnfsQWY2vgsc2HDdcGEBUg/B2zz86TBvHozggPPkHdeb6ix87nEkCt2tnn al+vxLZQLkaLTPrmXodeZGmKQEMQdb+7OQaLTtj2xs7+LGsVoAx77J1i1ttaHn77R2qG O0c1M2TXhVyv4+cI+mHbVv+GUduOQAkfjVipp41DTgy1fb066Wcsfb8BGY3eJIynm6jT vQ/9syflnU2G18L9GJnpe7PQ8TbuGuFFvdiTuNs4JHw0HEpmOS3r5nC3u6B1r/43pmQc lDcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g4PC4xOrQIxZ0ydw36JaxPy1FgjMMgTstwR54iH0OOQ=; b=TO41hM9xB4PYZ3iV0QLXGFmxrCnI9Q1QlzBwnLg0+Gitc8byaRMgLz98qWUjx+KZ+J HUms0wtLfHeyshN+8dF8BgAMBEv0/SeK5DPRC0fZMsXZUGhmyF1O2t2EAwvkzdUcIAPA NDoAZ3OVLHA9tXRr8+uO0prvo/NnXeSOPv+aeYaHY7t4NvL6KUa+LslMhQrwMrgNUoe/ yoQAyaT3yngD4GreB99BuMhIaR8sIIZaOxQvsYU5xH+FRtWIzKOvuvaRj9t3HR08NtbI dUcAhTndBgmp1VHJnmgKHVrr6dBEsqBW1tVXDEPvFuIoK4n8yNEzWGIgQ86k6xc3AnoK FGYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uDLegif6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om40-20020a170907a1a800b0078d550c0272si17435574ejc.269.2022.10.22.01.47.27; Sat, 22 Oct 2022 01:47:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uDLegif6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234856AbiJVIq3 (ORCPT + 99 others); Sat, 22 Oct 2022 04:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234978AbiJVIoL (ORCPT ); Sat, 22 Oct 2022 04:44:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 475612C6E9E; Sat, 22 Oct 2022 01:07:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58F8460BAA; Sat, 22 Oct 2022 08:07:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65443C433C1; Sat, 22 Oct 2022 08:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666426035; bh=6HicgzDugBOerZVbAxSgXH2xBFYBrHxtY5zu4BuDnVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uDLegif66pSGgV2jHhObzgJK3qKtEitiHmKkb93hYOStGi9AYG8MrNdACG8MOREYw 1aZby/F13hgLAYcg9bFsxesHwaxayrwEMyPykrOhLUR8Fc+vZ842ef4seIim772nLH qRVZViJgx7LAkA7zGM4+PAL0I92H1hmDrPvEen8g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Namhyung Kim , Ian Rogers , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 5.19 698/717] perf intel-pt: Fix system_wide dummy event for hybrid Date: Sat, 22 Oct 2022 09:29:37 +0200 Message-Id: <20221022072529.333384768@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376901260584407?= X-GMAIL-MSGID: =?utf-8?q?1747376901260584407?= From: Adrian Hunter commit 6cef7dab3e2e5cb23a13569c3880c0532326748c upstream. User space tasks can migrate between CPUs, so when tracing selected CPUs, system-wide sideband is still needed, however evlist->core.has_user_cpus is not set in the hybrid case, so check the target cpu_list instead. Fixes: 7d189cadbeebc778 ("perf intel-pt: Track sideband system-wide when needed") Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221012082259.22394-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/arch/x86/util/intel-pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -871,7 +871,7 @@ static int intel_pt_recording_options(st * User space tasks can migrate between CPUs, so when tracing * selected CPUs, sideband for all CPUs is still needed. */ - need_system_wide_tracking = evlist->core.has_user_cpus && + need_system_wide_tracking = opts->target.cpu_list && !intel_pt_evsel->core.attr.exclude_user; tracking_evsel = evlist__add_aux_dummy(evlist, need_system_wide_tracking);