Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13192314rwd; Fri, 23 Jun 2023 17:51:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66kcbGWc2FzODboWNYJB2Q1WS3i1K8LtgE0lyFYos4lOhzOdzM6h+eeslLpfVXTCpOtncY X-Received: by 2002:a05:6a00:1309:b0:64d:42b9:6895 with SMTP id j9-20020a056a00130900b0064d42b96895mr43064641pfu.5.1687567908027; Fri, 23 Jun 2023 17:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687567908; cv=none; d=google.com; s=arc-20160816; b=EFE7M3hLEVEHCJF2HbI983Rrpc/OrWbNTMVMvmwVhdcNT1OidfoinRa6muxdo+H5DZ axkQxhiL4kXkIA7PSVgOmHLtqG9QLnjKFHPXlFULIvE2y5mztglMRUHJVrPF4fETMrFo jbbTg9IG9W0P5QfUK9hmrld4Sjc9RQJ7Q8cH9/HAh4yDOx52Eus0laHYpkh5BdugWTbK JFcYiQLPcCGeDIY6WpoXhYyKeQreJrbMOLyQjvxCxUTokwYBDbExAnfgbnXCkexHEIfj oD3HuUkzlaaDmiaHAVBCtXtKc4lS1A9PULmLX4JS5jjABmaCnC55uEl255GgKmrbbUw2 0boA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=HaMOtM6w3SFykKkKZva8JSporBhu8i1BdzyR3KWj2nc=; fh=hgi/ClqR2Pg5ziQkOReBZMBfaBr74aukZNTIt2iPDQ4=; b=JIwuzHT0+vF+gaULGc6nejEGHbyg8Hx7X8GEexO+g+tsToBBBfu2AJ2hPuFkopiM0+ mgjTvF8Qyd803VeFJKJF9BMAeowoH8H93zy4Jt0iYIS79lkeq45N88Xni6Wyb/uQqal1 alvYKl1nY/r1tywZxo0rNzxzUrcVJU1nFGLLfLZ5b1/Krn+EBqvbeMyXsw9YfxeQeZD7 qH+UilqB4ZwSAJetO58NytuUArRRrRskxEz9zL+dw0tz15zuarPeA4SbeZxxClQRxzol VmbRiQI+8PLSV3mTdylXSKxq0zj3O6z3Ub7Z2dMBOmZrmVQMXdSRzgEVLcPSsjJ2qATb UMNw== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a056a00191000b0065f12af3ec7si338977pfi.104.2023.06.23.17.51.36; Fri, 23 Jun 2023 17:51:48 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232453AbjFXAmZ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jun 2023 20:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjFXAlf (ORCPT ); Fri, 23 Jun 2023 20:41:35 -0400 Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA2D82D5D; Fri, 23 Jun 2023 17:41:21 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-bc43a73ab22so1994727276.0; Fri, 23 Jun 2023 17:41:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687567280; x=1690159280; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r/FuRD6bejRQah/PpTEFj6gbgQmoOAaWot6r6iD99aY=; b=hQq7aeF5Bney3E8au7auP5e0GtRHzkuIYwPY95XndGoyDz5yIECSkFTELRG5Lzd5w2 tFpYDyIg1V5AwMmIQwg1tgEJ28AnIuyzNM9K2P4FUCQkCxXXdSiXJZWbQUkVwDpBHvVW 2Yfh04By453RagiLzRaj7QyUt7TyzSL8z9rYxh2A3Ytz0kk63EN7JCZGZkMPN7PAC8pc eFqn1iCTAdEcb9Ub+Z+rBdR2nAoQ5R/L9uRCbsZBMB87WaZKW8oe+kfOEd034epc1mki 3St53nIoEbsjBZ63JWXw1bK5PKckFWkzUQR8dtdcdSzK5IfCvgiD1KxGVK6nAcU9hPJt //ew== X-Gm-Message-State: AC+VfDyR/a0KFKXdhuujMPOv5FlE3EyurmGKp8fq3l+dLR1Nutui7Qbt o9c3KBM/AW3SAKMEnwmZzR37J5eD8MAg44hk41YE2JSeA6Q= X-Received: by 2002:a25:e751:0:b0:bac:fc30:3913 with SMTP id e78-20020a25e751000000b00bacfc303913mr21471004ybh.21.1687567280546; Fri, 23 Jun 2023 17:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20230623041405.4039475-1-irogers@google.com> In-Reply-To: <20230623041405.4039475-1-irogers@google.com> From: Namhyung Kim Date: Fri, 23 Jun 2023 17:41:09 -0700 Message-ID: Subject: Re: [PATCH v4 0/4] Bring back vmlinux.h generation To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , James Clark , Tiezhu Yang , Yang Jihong , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, Jun 22, 2023 at 9:14 PM Ian Rogers wrote: > > Commit 760ebc45746b ("perf lock contention: Add empty 'struct rq' to > satisfy libbpf 'runqueue' type verification") inadvertently created a > declaration of 'struct rq' that conflicted with a generated > vmlinux.h's: > > ``` > util/bpf_skel/lock_contention.bpf.c:419:8: error: redefinition of 'rq' > struct rq {}; > ^ > /tmp/perf/util/bpf_skel/.tmp/../vmlinux.h:45630:8: note: previous definition is here > struct rq { > ^ > 1 error generated. > ``` > > Fix the issue by moving the declaration to vmlinux.h. So this can't > happen again, bring back build support for generating vmlinux.h then > add build tests. > > v4. Rebase and add Namhyung and Jiri's acked-by. > v3. Address Namhyung's comments on filtering ELF files with readelf. > v2. Rebase on perf-tools-next. Add Andrii's acked-by. Add patch to > filter out kernels that lack a .BTF section and cause the build to > break. > > Ian Rogers (4): > perf build: Add ability to build with a generated vmlinux.h > perf bpf: Move the declaration of struct rq > perf test: Add build tests for BUILD_BPF_SKEL > perf build: Filter out BTF sources without a .BTF section Thanks, I'll take them with the following change. Namhyung --- diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index b1e62a621f92..90f0eaf179fd 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -132,6 +132,8 @@ include ../scripts/utilities.mak # Define EXTRA_TESTS to enable building extra tests useful mainly to perf # developers, such as: # x86 instruction decoder - new instructions test +# +# Define GEN_VMLINUX_H to generate vmlinux.h from the BTF. # As per kernel Makefile, avoid funny character set dependencies unexport LC_ALL