Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp743512rdb; Fri, 6 Oct 2023 19:14:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxWXDtnTM0ddddl+AHG830kouLa1Y2dHWjlsirgf47iSCMLCOqzmW/eRWuwxXOiM9nqvNp X-Received: by 2002:a17:902:8343:b0:1c2:82e:32de with SMTP id z3-20020a170902834300b001c2082e32demr9465203pln.0.1696644847100; Fri, 06 Oct 2023 19:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696644847; cv=none; d=google.com; s=arc-20160816; b=SLM9G9hVX+iaF2Juhdm3YoRxjWFqni2f8JXmXYdZDyDgVtzhDUokp9RofRoYiOoKfS sYVwzGCMSzX72+rW6f4A8NMz22Yo/ztUBdZCNVsggDmNcrusBsK2EtN92JEy4eCDh0cc xgb6T4V497XxMMt4v5lYzt8WYC6ckplLHiKADQokB0pRFVvyd+IbpnE4oOHHRZKofdRy PJfRjHXzvsdsUzW7ygnHpRRtE43v9irWhf2HCuYc0v2OzdQ1l8Ggj3NTDsJRpf9W6Sox KMIx3l5WaY68WyTPgWT+T2bvcPatU+ePXIti6gWBZCnaIk+XpCiQXnkPxXaeceZ3eeFK Ep6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=8fc7EI+IqMoK5GVnqlsLaiP62BnjpCmFT/Si/B7nJZs=; fh=/5tleBjPDujrXIYss611tAyhfELId0etfY4oKm6i49Q=; b=nNM33/OFIexX0TVljQmk4WjnB/qb0/LrAJ2qioadw50BzHFl4xR6lCvVVFg+UdUSJd s/esispt3w7HmGbzTDK8auk/iWacg9rMRTYTnUFjP8F/56hb7tYoCP7dy882LICYj2Sp H+UBtqkHI/wnjVHBQm+vpn9p4urZIY5Alk1JLMj9YC5ri4FOA1AKRK/Dj7GeOPLURGvd xpRffp/dlAKsaLJ+QIiLRJjQztsyj/Wz1MA+R8/2UoIjwei2uNLAn0oMPc34EOZW/m1l XQskBqy0YZahUvNXnWjU6BZEHZWvBqNZmKjDrDpqu6rIpTxnVpfRutMCGLsmH+oZAera Xwng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zJgDK0rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s11-20020a170903200b00b001c3c94d212fsi4744742pla.97.2023.10.06.19.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 19:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=zJgDK0rZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4D076818CC8B; Fri, 6 Oct 2023 19:14:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234087AbjJGCNz (ORCPT + 99 others); Fri, 6 Oct 2023 22:13:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234069AbjJGCNx (ORCPT ); Fri, 6 Oct 2023 22:13:53 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AB51CA for ; Fri, 6 Oct 2023 19:13:52 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d86766bba9fso3842066276.1 for ; Fri, 06 Oct 2023 19:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696644831; x=1697249631; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=8fc7EI+IqMoK5GVnqlsLaiP62BnjpCmFT/Si/B7nJZs=; b=zJgDK0rZ1nQdVyYd+zr+B9/D9pYts8s5cn8NxT4eo6cErsMSnxIZSgwdaWfnfFDJF9 qAajyn8qFg6g2Bbq5qRlhKoj0BIUQm1JqwNMeraEjjZW5ks0dYNyU2JJkv2LTyS2Y30Q Sq/LNG2/3+e7E8P6NqDp0zH7tEkoPOmTAFhvXj4GLz5YLWsyCsYG2S8CHmbOjtpz1Pyu Hn/vRMWAlfnFJK7tqgu02dDExQV0fWZ/Flv6lH+byB7BG8ADP+aVFgcfYyHwWAZ0PVqh PpFSTVE2CL3CB/tZSVNoTFZctRrDajpMUOSaGoO/5vszaIIpskzWjLXCDrFdR6uQdKrl F2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696644831; x=1697249631; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8fc7EI+IqMoK5GVnqlsLaiP62BnjpCmFT/Si/B7nJZs=; b=UOwGefIpNMFB7g1jZ5ZSNzWacbd233YTWr5LtmQGWQVJ29jaxGfF9QjfNfwtzwoLfV vDYIicVjYV1lKbaWTpMxp90TlGFcsrb0TMY8S6PGsTuWBGtu53sfXsSW7EC4Fp0iecPV yrjMF7f3FaTpWyIscpKUoHZXTbhOZetdz7PRgkldan8o1L/Ox9Hiout/YZd3CxUJXqcH jl6FtmaG6YBHWDz9WvtjopxgPYqdtGiCQqdjph2t2rnhWucKMBPBfxY5jJwFjA7GlTek UgYDrBAkTnO6NMTP3PuCwKhaOcs/nBADpUM5dPFsr7EgUrbrognASoHcAFlzb2/sjkDr b7nw== X-Gm-Message-State: AOJu0YyNb2Z7RgoxC0h3wsGeb0jJjYn9ChKKJvWZQkzvibBXho7Ikz66 Nk159ahvwOFkuUxZX8JCntI5mfT5HTi5 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:7031:b36b:6c77:bfd0]) (user=irogers job=sendgmr) by 2002:a25:e20b:0:b0:d81:817c:582 with SMTP id h11-20020a25e20b000000b00d81817c0582mr155263ybe.7.1696644831137; Fri, 06 Oct 2023 19:13:51 -0700 (PDT) Date: Fri, 6 Oct 2023 19:13:21 -0700 In-Reply-To: <20231007021326.4156714-1-irogers@google.com> Message-Id: <20231007021326.4156714-3-irogers@google.com> Mime-Version: 1.0 References: <20231007021326.4156714-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog Subject: [PATCH v1 2/7] perf intel-pt: Move PMU initialization from default config code From: Ian Rogers To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Thomas Richter , Ravi Bangoria , Kajol Jain , Jing Zhang , Kan Liang , Yang Jihong , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 19:14:02 -0700 (PDT) Avoid setting PMU values in intel_pt_pmu_default_config, move to perf_pmu__arch_init. Signed-off-by: Ian Rogers --- tools/perf/arch/x86/util/intel-pt.c | 2 -- tools/perf/arch/x86/util/pmu.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index b923bca939d9..6d6cd8f9133c 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -267,8 +267,6 @@ intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu) attr->config = intel_pt_default_config(intel_pt_pmu); - intel_pt_pmu->selectable = true; - return attr; } diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c index 811e2377d2d5..949b3e2c67bd 100644 --- a/tools/perf/arch/x86/util/pmu.c +++ b/tools/perf/arch/x86/util/pmu.c @@ -22,6 +22,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused) #ifdef HAVE_AUXTRACE_SUPPORT if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) { pmu->auxtrace = true; + pmu->selectable = true; pmu->default_config = intel_pt_pmu_default_config(pmu); } if (!strcmp(pmu->name, INTEL_BTS_PMU_NAME)) { -- 2.42.0.609.gbb76f46606-goog