Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp477511rdg; Thu, 12 Oct 2023 10:57:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGV5VOM7gtRBpZ5o7nRXCkrCkDlrb9qDS5FWzjLp4SLXT0J136ig/kef71bDdkm2WGkszL+ X-Received: by 2002:a05:6a00:1252:b0:690:2ecd:a599 with SMTP id u18-20020a056a00125200b006902ecda599mr23528801pfi.21.1697133451542; Thu, 12 Oct 2023 10:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697133451; cv=none; d=google.com; s=arc-20160816; b=n9pGO56Glr0PKzMxfZ3LbeDgKjyjTMnj8BlhQER3mx2AtPF2ChHgLITe/msOxTCNjU WF0ntmYQpF2QEuATt4CNB8N+vULBX2seivR5fVXtvl3ha4yVI44BS/yzyUQ3VP4GuY5E hwQGrJM91C4Yb07xBeDhK2SCyxyJQhrGHEsdVlmvGlPmHB3i38luCrL1BoajH5C7xsJy ncr54QvjrASyxTSosNy4ArQLG+96B4c1wQ1mz0Ty8smh1DJPMux2LZLDtDQ9AenKBL0C +eOsUcdv/WWHPKzPqxnR9Kb40IdhCQtSD9QimXyHTzWCw/VJANMyFT0NujJ5O8slGsrV xjEg== 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=1DriF+z0M9pYZTrNMVGeu8wBadZBaETJJrGU681YhYE=; fh=/5tleBjPDujrXIYss611tAyhfELId0etfY4oKm6i49Q=; b=ycvP59lHobWc/+QZnRKOplc7xIZKBb9E3By3NcyWvjW3MndX8hXgmRQ1nWt7cZbueD uKQyRcQsOJWIwkQ2HQAfqNFxcJKWVWThoLxmxKGmMg9R2fDtEcBNZYM9gEm63bsCEDkM KyLNpfbCpCGBad3qqfnbWij7Swt672IyHGZxvMOHZncevGk4pnKFCRWuiENTw2NjRUVc eNxgRnbHN18uZfgpAE8rWFClLXy90/iS8Udzc64H1/PVQrzXcAa7DbFNWUbKqdHY5eEI 9FD6trQk3NXT5nvV2Pf4mYc6loZmHyS7b01my0CmV3vhUsUOgkD4lksJpQs4JPGy9vtd 7alg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eidiCyWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 15-20020a630d4f000000b005898cf1c6a0si2732665pgn.324.2023.10.12.10.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 10:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eidiCyWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id C37B1831F7C0; Thu, 12 Oct 2023 10:57:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442006AbjJLR5A (ORCPT + 99 others); Thu, 12 Oct 2023 13:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441986AbjJLR45 (ORCPT ); Thu, 12 Oct 2023 13:56:57 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A825D6 for ; Thu, 12 Oct 2023 10:56:55 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5a7cfdacf8fso18923587b3.0 for ; Thu, 12 Oct 2023 10:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697133414; x=1697738214; 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=1DriF+z0M9pYZTrNMVGeu8wBadZBaETJJrGU681YhYE=; b=eidiCyWJyMdTHyN/dnpxY2aFaJdKTx4Ui1y6UFfifpD97IYXS0xNa/HSDXgubwDsUp xjP80vN1oL+7rlj5DSteS4T3PP0Z0j+jfohKRZSn2FIGwOyZg1NHQ+5iFRxgHZMzMUwU o8/fSMvh0tPB3zj4WXMSwrr/nqi9VYfJA+EDA7scQxOPSbNh1/iH+TAb2OR9aoegabV0 jWNpnGzldJfN+lDH6+jeuS0yYuJm5XgGjoOZv2O7DtUaOX+xmXq7AfER6ezGV8vN3CL/ 47w2Wzr5NzMhZauzlBi/V8SLEe11xvMyFuGARe/yK0jqS/K5A5ymUbuDliDtfw/lrifC kyXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697133414; x=1697738214; 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=1DriF+z0M9pYZTrNMVGeu8wBadZBaETJJrGU681YhYE=; b=DEoz+q7w562VkL5ERmbeGhWzAtf8OWzVtheRjX+f1zA2K9fYqj7kuie3U4FErUmcmY e3WSrf7l+LAp4aUMypRPyKpfOw1qY+5qCnwhT3nq802LEqqrnXjJ7O0PU75/WdYeSlci v6PCp0LuG6iwSwkGYxAXoTldLQqY3ZevZ6Clno9+srdU4eoKYUf3NdHks25spUCZGR01 p8pfKS8sPK+Macm/hYc/qB5J+ByjwpONQGLVXGscTAWgfQn3xLLA9DKfB+fIbT2fDfZ2 2vBrKM1tRnh4xeihWg1Q9dznHIf6rZ85xI5PRUfRc4ryb10/eHVQSFhe4/gePjgc2YSK VrMQ== X-Gm-Message-State: AOJu0Ywvon2nX0vZWZV+kgG2aNPQ72+MDxCXF4L8CRGBWXmIsMJxZWZn hF7vSs33dKWS52RwDlZzS0xFe65jmiE0 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6a89:babc:124b:e4e6]) (user=irogers job=sendgmr) by 2002:a25:1682:0:b0:ca3:3341:6315 with SMTP id 124-20020a251682000000b00ca333416315mr539810ybw.0.1697133414595; Thu, 12 Oct 2023 10:56:54 -0700 (PDT) Date: Thu, 12 Oct 2023 10:56:40 -0700 In-Reply-To: <20231012175645.1849503-1-irogers@google.com> Message-Id: <20231012175645.1849503-3-irogers@google.com> Mime-Version: 1.0 References: <20231012175645.1849503-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.655.g421f12c284-goog Subject: [PATCH v2 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=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 12 Oct 2023 10:57:27 -0700 (PDT) Avoid setting PMU values in intel_pt_pmu_default_config, move to perf_pmu__arch_init. Signed-off-by: Ian Rogers Reviewed-by: Adrian Hunter --- 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.655.g421f12c284-goog