Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2803760rdb; Tue, 12 Sep 2023 12:32:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgmjuQgC8s3/wbiTSTj5u9Y07C7bA3c0qu2iK+EacTX0wUMCOgbPIf2JsvYispcQflB0GB X-Received: by 2002:a05:6a20:5658:b0:12d:23ea:9ccc with SMTP id is24-20020a056a20565800b0012d23ea9cccmr317648pzc.39.1694547170409; Tue, 12 Sep 2023 12:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694547170; cv=none; d=google.com; s=arc-20160816; b=muhB4ocVpIAKUjW9HLeCOkG/04TVAQvCy4B+TpXkWtVkLa35sAuvNZRLVbZv4Ltu05 YtYExnQ7Od79JRS3N+qLkG2TEPiQO5vUk0bJej+W2fUYEAGtSCkow1aT3vaYppSv6+Wt EXOu77IkeiIcO3m6BLWLn/y01Oal5bTJyvaRWlOs/nWMlmsjbuwh5AhSp8gEvrJJAvZi 5CECrJmb83gUvN8iFL4MWUe9kYyX2NIRqCm0cfO0OPzGpgihSioElNIm4UW2mOigRsAr IuNTDl2R4UdM1y+KYnJiNamnngNjdgc9NSbnUVB0atQB+2ynMlrarOTvIsLm2a2xQ0Lv Q8Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6FYvajVMDtY71Rq8O+O8TDgILrvka9xT8o4H5avlKb4=; fh=O4/60Oza7V+/c8x6oghgtkBvo+xrLxJm7mh5AN4MuAY=; b=pOIA50WufF+QABw7ye5rEKXnJhN+GjsvfeoZAkenOWUvvT+RyMR4Mk0HYq5Lmep5HO mO/guPo7HVq3ecBs2LkGjRxChI8DoIQfqOPRP47f1KNt9C68PgtoUoInovu8prAvbgzw KDxq93vxFZ0vEvJpr0Q14e+LJhOrolAfCA/PsMUuy5/+djPR8IH8hNzo51eFwP992b5i 8TVtS8ZmiXGFBzkAt63gRSwWOV5duRMvC1L1gsVDn7zpckUFhzafKhoRrz/j2XMYrGHT 3zxGa+bhZ8KsQBUs5Qys6oU9fjZPU1YyGsUF73Krblv38RB421nctPnam7MODuNSwNxi Y3FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JHOBkBbS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t13-20020a056a00138d00b0068ff659af62si792452pfg.106.2023.09.12.12.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 12:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JHOBkBbS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 35E8D801C8AD; Tue, 12 Sep 2023 12:27:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236642AbjILT0x (ORCPT + 99 others); Tue, 12 Sep 2023 15:26:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjILT0w (ORCPT ); Tue, 12 Sep 2023 15:26:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA5218D; Tue, 12 Sep 2023 12:26:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DE84C433C7; Tue, 12 Sep 2023 19:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694546808; bh=VKmYlBUpT/bsf1QKh+D267MgH+5GNHBssL6sD/Ma3Zo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JHOBkBbSNmOqERjudtzSv/JeaolTlSARYp8FJBxijm+lV2WsBYmAVdLEAUeDdh9MW L8B4BZ/k6gYBbs8lBKUpuMFlVZ+af5a4BpoYgz0SDdKJoO0LFhGveOEE9/PoLPZlsh FRSwoQTg63vDWylJ1ifvXqi8njDsu+WcecfH30yNpP+B6BiwzlANAUZAVM4cFFd+2+ u2aSA9FyhjffhisEfbGuChfzor8dOrwv0QaOOiJpjmiyqtZx/yn3vVNPkSaW8noA5h yhzSKqjsJZ7h5m2i+taMPdWXCt+bL/zaiHzJZPBLuTALgrZCC9Ufeod9mFp1TmMaI9 z6p3w6xfUJrzg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 38587403F4; Tue, 12 Sep 2023 16:26:45 -0300 (-03) Date: Tue, 12 Sep 2023 16:26:45 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: linux-perf-users@vger.kernel.org, irogers@google.com, John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Jing Zhang , Haixin Yu , Kajol Jain , Ravi Bangoria , Yang Jihong , Eduard Zingerman , Chen Zhongjin , Miguel Ojeda , Liam Howlett , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/7] perf pmu: Move pmu__find_core_pmu() to pmus.c Message-ID: References: <20230831151632.124985-1-james.clark@arm.com> <20230831151632.124985-6-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230831151632.124985-6-james.clark@arm.com> X-Url: http://acmel.wordpress.com 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 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 12:27:09 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Em Thu, Aug 31, 2023 at 04:16:16PM +0100, James Clark escreveu: > pmu__find_core_pmu() more logically belongs in pmus.c because it > iterates over all PMUs, so move it to pmus.c > > At the same time rename it to perf_pmus__find_core_pmu() to match the > naming convention in this file. > > Signed-off-by: James Clark So, this one is hitting this: CC /tmp/build/perf-tools-next/util/expr.o In file included from /var/home/acme/git/perf-tools-next/tools/include/linux/list.h:7, from util/pmus.c:2: In function ‘perf_pmus__scan_core’, inlined from ‘perf_pmus__find_core_pmu’ at util/pmus.c:601:16: /var/home/acme/git/perf-tools-next/tools/include/linux/kernel.h:36:45: error: array subscript 0 is outside array bounds of ‘struct list_head[1]’ [-Werror=array-bounds] 36 | const typeof(((type *)0)->member) * __mptr = (ptr); \ | ^~~~~~ /var/home/acme/git/perf-tools-next/tools/include/linux/list.h:352:9: note: in expansion of macro ‘container_of’ 352 | container_of(ptr, type, member) | ^~~~~~~~~~~~ /var/home/acme/git/perf-tools-next/tools/include/linux/list.h:404:9: note: in expansion of macro ‘list_entry’ 404 | list_entry((pos)->member.next, typeof(*(pos)), member) | ^~~~~~~~~~ /var/home/acme/git/perf-tools-next/tools/include/linux/list.h:494:20: note: in expansion of macro ‘list_next_entry’ 494 | for (pos = list_next_entry(pos, member); \ | ^~~~~~~~~~~~~~~ util/pmus.c:274:9: note: in expansion of macro ‘list_for_each_entry_continue’ 274 | list_for_each_entry_continue(pmu, &core_pmus, list) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/pmus.c: In function ‘perf_pmus__find_core_pmu’: util/pmus.c:35:18: note: at offset -128 into object ‘core_pmus’ of size 16 35 | static LIST_HEAD(core_pmus); | ^~~~~~~~~ /var/home/acme/git/perf-tools-next/tools/include/linux/list.h:23:26: note: in definition of macro ‘LIST_HEAD’ 23 | struct list_head name = LIST_HEAD_INIT(name) | ^~~~ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:97: /tmp/build/perf-tools-next/util/pmus.o] Error 1 make[4]: *** Waiting for unfinished jobs.... LD /tmp/build/perf-tools-next/ui/browsers/perf-in.o So I applied up to 4/7 Please continue from what will be in tmp.perf-tools-next in some jiffies. - Arnaldo