Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38443737rwd; Wed, 12 Jul 2023 07:47:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlENh7/W0nb34Ed6xTzIAUjiFKAmwFP5U9r+KveOREKwME6Cd4ln7y3EFEkEp+/GLEN6uGEo X-Received: by 2002:a05:6402:50c9:b0:51e:5390:9166 with SMTP id h9-20020a05640250c900b0051e53909166mr12243632edb.2.1689173220006; Wed, 12 Jul 2023 07:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689173219; cv=none; d=google.com; s=arc-20160816; b=n4OlAsScfAo2d4p9k9fMXC5FwadzZyPfMV2an9Q/gO3/cpx48iNPOOaXpkiopAV1Rw qwBJLTsYZ6NdWELzCAEk989+CI0uNPxoUcrgdDESxfAJGIHRqEan1dDrt8dqYH5u/D3X N0qAfMWGe34P4l56dQtrhUptLmzMOen2fDm5dkYJGZ6Bk8U5Iy6ZBkO8j5dT7NVNM9/d AjSGwaRqKY7IVwrMzKFqnjszjJL9BQoPI2/hErFC+nXo0m6RmCoEjy6h045gNezxqTxl I8VPXXBj8+UNpCr3jbJ56Y0oLa3v9Jt745KF9/yKlTCtkVJcRSvNfe71l1sBiaiNhywN HJZg== 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 :to:subject; bh=XJ4/B4wDEk4mxmV9qY8BVNPEgYfJW0TQcpaynkDhSws=; fh=mHKvWaNSen2xS5iQ7Fn6ju1Wg3Evln+HhI3cUf5CIWg=; b=IPAo7AELPKXe5+1xfGfsY7a/IiZnTEsQw6MEv5quDrHVSO+KOhoj5Phf2mFGE4bv/y wAeXxcussUm5xaOD1STeyZSM73ryUfltJz9uupUgcbOkUrDtVhfAA6QtzFRhtKM9Kz6B yCja9t5yDcygfl8sewggxYRtS857sN3qSA1obGFQcEtj6JJhq3PCzVwNaL6Fma2iXpjj 1r8ZgT1yN92jybLPApgbvduSpZKOaCRQNX9RYqIHD+vLw5VUl+3FkiHXnp63BpptkR38 SX3zViEadgZBsyADdFPXiZHACHaN6YXKZEjjc6sTVmTV9ncJOmklNILCm6mPNV3DS6x6 X3ag== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020aa7df87000000b0051de3b9e331si4936837edy.561.2023.07.12.07.46.35; Wed, 12 Jul 2023 07:46:59 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbjGLOas (ORCPT + 99 others); Wed, 12 Jul 2023 10:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232923AbjGLOao (ORCPT ); Wed, 12 Jul 2023 10:30:44 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 405AD1BDB; Wed, 12 Jul 2023 07:30:40 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R1Krp66GCz1JCXD; Wed, 12 Jul 2023 22:30:02 +0800 (CST) Received: from [10.67.111.205] (10.67.111.205) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 12 Jul 2023 22:30:37 +0800 Subject: Re: [PATCH 1/5] perf evlist: Export perf_evlist__propagate_maps() To: Adrian Hunter , , , , , , , , , , , References: <20230704074217.240939-1-yangjihong1@huawei.com> <20230704074217.240939-2-yangjihong1@huawei.com> <180925f8-57f3-c97a-15c4-db2c73abe4a2@intel.com> From: Yang Jihong Message-ID: Date: Wed, 12 Jul 2023 22:30:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <180925f8-57f3-c97a-15c4-db2c73abe4a2@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.111.205] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello, On 2023/7/11 21:12, Adrian Hunter wrote: > On 4/07/23 10:42, Yang Jihong wrote: >> For dummy events that keep tracking, we may need to modify its cpu_maps. >> For example, change the cpu_maps to track side-band events for all CPUS. >> Export perf_evlist__propagate_maps () to support this scenario. > > __perf_evlist__propagate_maps() is quite low-level so it would be better > to avoid exporting it. > > Or can we export it via internal/evlist.h? Because as mentioned in patch 2: void perf_evsel__go_system_wide(struct perf_evlist *evlist, struct perf_evsel *evsel) { if (!evsel->system_wide) { evsel->system_wide = true; if (evlist->needs_map_propagation) __perf_evlist__propagate_maps(evlist, evsel); } } This interface needs to invoke __perf_evlist__propagate_maps. Thanks, Yang