Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3805502rwd; Sat, 10 Jun 2023 15:35:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qqCF8ngQMIqXkcXNLDUz2r+PbzHtnG7LFfg+V51oyXkxO+V9tc81fKUeTBr0udoVAnD5V X-Received: by 2002:a17:903:2582:b0:1b2:43a2:f2d with SMTP id jb2-20020a170903258200b001b243a20f2dmr2520644plb.32.1686436551477; Sat, 10 Jun 2023 15:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686436551; cv=none; d=google.com; s=arc-20160816; b=IXtdGdZ5BCgl82PBO4sZcIjmT9pvC4zGFzlrNqKH50Xg3KQ+ZxG4nbzsWIlsQiHFCA IGEE3yTze6g0rFhUY7gYpMgHpH0WRVRh7BHXpDyV/7yCuJXdJpfwh5Vp8eaIjFxkRULI PVoDax1ivXMRJwp39Jh90UY6ImJoD+9sk1RSX5TiRWKvoIsBb6fiazcYKC7ZZCC67YvD kqDVgwyKEcvrT0ju55ZkMw9cMsUQuMoz54u6GwA1U9voIYuGiU1w9bUucXBYtCgA2qrb NU4vFZXTJbA52a0YBdYqNlHWDm16SV3yZMQ5zJtfMj537WrZmP/GC9JeKjgXkUmsdSSg A5uQ== 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-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=c2K/vXSH1Ru9AaenLQ5OAeVVoA6HlojAGRwcG2Pghjc=; b=vO9K2y2/lVskht4bGWQ7bPn1iYTizFU/jO86n5/3EILMbR3SqzekErPP1JPpZOh7rn 2U7yzTv7gIV+6QzmOacf9A60PDWqhnxfR3r+IIQYRpGejmSJrRxxEy+TEbdUzpmzVohm w2JjTvq0kWH6IxFwIJ7CwzBQCIVXADOEX4F+S3u1rShbxk2O47+q61BLmIJinLpj/son K4kBWnT2Cp/amsNTay5FvDR+LEyDDa6CsYR0aQgSyHPn46gHY0vZ1JgNrbQr6n2Q/E9K 5AGsbPr3IXyzYHWoLdudt7njVkO3242spZruWtSDRLkNGeFHUpIvYUJDEdAiE06S4l5E kyKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SGn5PIik; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 82-20020a630255000000b0053b0da378edsi2074981pgc.789.2023.06.10.15.35.39; Sat, 10 Jun 2023 15:35:51 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SGn5PIik; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbjFJWOe (ORCPT + 99 others); Sat, 10 Jun 2023 18:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232501AbjFJWOb (ORCPT ); Sat, 10 Jun 2023 18:14:31 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1466535A9; Sat, 10 Jun 2023 15:14:29 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f7e7fc9fe6so29986385e9.3; Sat, 10 Jun 2023 15:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686435267; x=1689027267; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=c2K/vXSH1Ru9AaenLQ5OAeVVoA6HlojAGRwcG2Pghjc=; b=SGn5PIik8gN8dqE4k/E+IsJtqnyqDxb95wJKsl121SuxxSvea6ULwN8lU1NQgJM5q/ pARoJYhuzw/fL5YrZvYvGyycKPUPMqbz6bGf6200C+eCThOwLMtClp0QJVPnWayNb+9h LFXJ3KX9dBayCjdiLtpgEmqBBscxvetE0NsdrHSISMKWTWcoY7rUTeK2fp1xJHq8RrMM 45jXAXi6kNCEG57HvxtzvmRGcq93JHeM1PcaGhSkPxjqnUyFYoBtuYb+gUCvWlmOyxym DLpGmhwVaSryTBlQ7pyjzZcdf3IYbWx6ejRxPVr9LGRlcDexixKIWV2U3I9PEhjx5a57 +2Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686435267; x=1689027267; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c2K/vXSH1Ru9AaenLQ5OAeVVoA6HlojAGRwcG2Pghjc=; b=eYcAKMNqu/l9lwj4kQCPaRhWQmbXrfOYFwdbdl/5K1t5IQvXbEQbUEtIo4FUr52trw EdNjTSIFP06iFEOHU0wQIiL8wGKWjZvDkC4k1SIrQqWCoBMXhEh0xy7QvhyZbIuAVxbT 6+h7IRCDqYEq7EmHAoOpXxV4t9pR6ygtk1LSfiqirMR8UloHk0yPKrtgW7NWejF8v/2r gewrC6kmi2O2RX9Pk2Kgqx4uOcV72UJ86xbYbbUyvGS8JlZtzXWOntrjrvKEbx9p+5Of jFe1661m4DnrXZfEZU00G9m+KJ9T0E0vyvCC5z9FlOvJ0R9N0H19DYyVhbT5ZgCTc1G+ 3fmQ== X-Gm-Message-State: AC+VfDxWQnXQaQZed4pH2VCbSTcPdMFjVJLhKzKolZ+DWFH4zX874MEo Qcx4u3THefydAychCO6cPDw= X-Received: by 2002:a7b:c84c:0:b0:3f6:76e:604b with SMTP id c12-20020a7bc84c000000b003f6076e604bmr4180596wml.0.1686435267228; Sat, 10 Jun 2023 15:14:27 -0700 (PDT) Received: from krava ([213.235.133.42]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b003f7f1b3aff1sm6742250wmi.26.2023.06.10.15.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 15:14:26 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Sun, 11 Jun 2023 00:14:23 +0200 To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Adrian Hunter , James Clark , Tiezhu Yang , Yang Jihong , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v3 0/4] Bring back vmlinux.h generation Message-ID: References: <20230609043240.43890-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230609043240.43890-1-irogers@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Thu, Jun 08, 2023 at 09:32:36PM -0700, 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. > > v3. Address Namhyung's comments on filtering ELF files with readelf. Acked-by: Jiri Olsa jirka > 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 > > tools/perf/Makefile.config | 4 ++ > tools/perf/Makefile.perf | 39 ++++++++++++++++++- > tools/perf/tests/make | 4 ++ > tools/perf/util/bpf_skel/.gitignore | 1 + > .../perf/util/bpf_skel/lock_contention.bpf.c | 2 - > .../util/bpf_skel/{ => vmlinux}/vmlinux.h | 10 +++++ > 6 files changed, 57 insertions(+), 3 deletions(-) > rename tools/perf/util/bpf_skel/{ => vmlinux}/vmlinux.h (90%) > > -- > 2.41.0.162.gfafddb0af9-goog >