Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2241237pxb; Fri, 8 Oct 2021 04:01:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgoUECrJhl14A4xsVpglufePPOINyw4GuN/V92kMf1MZELyBgxjyJo5iKevzEy/rH+eIVV X-Received: by 2002:aa7:96e3:0:b0:44b:e158:584c with SMTP id i3-20020aa796e3000000b0044be158584cmr9416235pfq.43.1633690885133; Fri, 08 Oct 2021 04:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633690885; cv=none; d=google.com; s=arc-20160816; b=HeaoacyY+rurxrtF+M4WJz4Z32muFOXgsv8JNXjsz2H5XvJE5msHhN30eckRJ7Zk14 qyra0EhrLZCqZEUFDZU8hJfMQk3LLPpsjC5ip2McQVFsNIfSPWXme+owPIJf+2iiq9rh yXOVvKDNu4ygLQwKDmcdYbXnD9GRs9dP2yM8RZ6h7Tc27pmEWONr5RZYJKW7gjrEBSXW aFSKN2jk6vBuVMGecnCThZ8VVMMwuF2Md0bO8mEflk14N9dS51oqw3MfB/ieQ47ARR1t 9qWOcKX2qVV3VwHO6VU1S7ORggsa7qJN7/7mLHjQT4WjCQSUPKCPOiXC5MfO+B9A+Fhi nLMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=8DFyXKtNuax/uvFYbOGqNI1jWxnUHJVNwFdmduhhO34=; b=j/Ap3sAiUYU8B5wvk7VRP+GLdwBFsf0pV5rGc7aE3hSApjrUwytQOHeVsDAbiNYLn0 nodVGaxgWX09QWwoqGB2livQTVeZSyvPc/tKnGi+KtdTLOVZStd1PYSaJGPXGDWUxHEt QPvz4ldKpAUfldMRz9W+mYpLhPLsxKrPSSYaCUaC1tw+cxZhGjPA0RcP1t0AM0V/visw ssry+r/ClVR7chbjpj5VNcfmQlLLo5fFVWJrp9fTnvc3Rt5JxtHQV4cHQF1wx0CkrGCk 86N+i6VQN74bkT61OHjUa6IICMIBxUnty4NDPbs7GoIAU2DrH3yO4GGPMLS99BSNaCra tX1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si2462526plx.384.2021.10.08.04.01.10; Fri, 08 Oct 2021 04:01:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239954AbhJHLBI (ORCPT + 99 others); Fri, 8 Oct 2021 07:01:08 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3946 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239650AbhJHLBH (ORCPT ); Fri, 8 Oct 2021 07:01:07 -0400 Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HQlTf2dyYz686q6; Fri, 8 Oct 2021 18:55:34 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 12:59:10 +0200 Received: from [10.47.80.141] (10.47.80.141) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 11:59:08 +0100 Subject: Re: [PATCH 02/21] perf pmu: Add const to pmu_events_map. To: Ian Rogers , Andi Kleen , "Jiri Olsa" , Jin Yao , Namhyung Kim , Kajol Jain , "Paul A . Clarke" , Arnaldo Carvalho de Melo , Riccardo Mancini , Kan Liang , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Kees Cook , "Sami Tolvanen" , Nick Desaulniers , Andrew Morton , "Jacob Keller" , Zhen Lei , ToastC , Joakim Zhang , Felix Fietkau , Jiapeng Chong , Song Liu , "Fabian Hemmer" , Alexander Antonov , Nicholas Fraser , Adrian Hunter , Denys Zagorui , Wan Jiabing , Thomas Richter , "Sumanth Korikkar" , Heiko Carstens , Changbin Du , , CC: Stephane Eranian References: <20211007165647.3514803-1-irogers@google.com> <20211007165647.3514803-3-irogers@google.com> From: John Garry Message-ID: Date: Fri, 8 Oct 2021 12:01:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20211007165647.3514803-3-irogers@google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.80.141] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2021 17:56, Ian Rogers wrote: > The pmu_events_map is generated at compile time and used for lookup. For > testing purposes we need to swap the map being used. Having the > pmu_events_map be non-const is misleading as it may be an out argument. > Make it const and update uses so they work on const too. > > Signed-off-by: Ian Rogers Reviewed-by: John Garry