Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1666187rwd; Thu, 8 Jun 2023 23:48:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6n+GBK51QSjQ13CZ2KO7pz04XD8vJxNXJ3Lr/qcguSYYdhTm7MpAd7ppPsKt+sbZ8SDeyh X-Received: by 2002:aca:1b0a:0:b0:398:10ad:e857 with SMTP id b10-20020aca1b0a000000b0039810ade857mr739959oib.48.1686293298113; Thu, 08 Jun 2023 23:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686293298; cv=none; d=google.com; s=arc-20160816; b=dpu3xfzPeQaDdXPPPW5gNbngAhMzCrphb4IqfICGUGlJ4KecSY2sd4ghiA4lzcIw4h 4XzoAPqGhG+DF54L4fOn4DFPzUWB1OMO9ALnZU83qumaOpyLngtJLNgiqZetJZsqn2Y9 2kAUgObdnPL8brpbSoy7aVwMUJaDnqc3vcmaCxkl0izfgttP55+FtnNWowy9tAE6N7zJ RCoeJLwokPjmqYaSCpz7A66AnLVVpvHUG9tsDDUteZFHFRyolkoVil71nBVxXOe+GA1F WBQbDqH8jqLKVfpMf6n9+jO9pcqkFyxm5IxidG+5Dc0VUvIJk+7zylZs5tJxmprivZkP 6f2g== 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=MvTqGm092i1oh3ljrSVbpWlby6HdhYY9Jz4Jw27ID+w=; b=fz8ijqyDaPnD8teruhPoRGzbDLhTztqowCK3xJX48b+1hzzLz++alGrXdjYJb9ZD5Z 4UZ1N7J1E/DJArIaFd6xr4iPFFqATEOpad/RAWuQvBwkZMgqnO5XdclgxQTQmLgs1uU4 R89JCad/eiUVLTlVClMBhF20cqwrGIzy4QF1MtAMYbDG493IOgT7sOGrKcbNDQ9AbPyd jWbHi9dXQZUUOLUGG2jo4yjT6IqaIQORDefE/L5GuiIzNfCWRm+QX4Zd5RkAxXql4GUE gW+hPp120u7J1d+3nR25sU4Xc0RJw8ywqQPOcMpfQHQP2/qZlE4bfmEbeOp1t0gjNbWy wpBw== 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 i27-20020aa796fb000000b0064d2ddc63ebsi1995876pfq.306.2023.06.08.23.48.04; Thu, 08 Jun 2023 23:48:18 -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 S230344AbjFIGe4 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 9 Jun 2023 02:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbjFIGey (ORCPT ); Fri, 9 Jun 2023 02:34:54 -0400 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F6E1BDF; Thu, 8 Jun 2023 23:34:53 -0700 (PDT) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-3f9b7345fb1so11342121cf.1; Thu, 08 Jun 2023 23:34:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686292492; x=1688884492; 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=757w/GYtIJVf5G6kf1fLOjt4zEb+gvb0ojwbx25/leo=; b=d006ztU0hglG7pfECd2hAFCBq+OIN6ythZ/PJo0yErpl2PrTOFxvYv5PvNs8lrEDXN p6ww89YjA9ATOpTMMqaqaOqhwPDSOWoBKxOulzOpjeWnqtT5BoVc7ZfURbVP5NEpsFpP Qt3qGfR+AY4FApxdCwNxO9b+qsVEEa/cIUlcRx5lqOXRlOCv2pXTPOfnZmWsv0/floag 2nq+mHU8PIiEW1DJUBl89UsWHC2avIJMm2OY55WxnGWI0N6981S0S+OL7OARv7NZHUbx AQsk0MJFb/THZFRdk0jLL5hWhAMfl0TM5UEx+hsncZAmtSZiiGMMCzUYsr9hM4DFM1lS 4fIA== X-Gm-Message-State: AC+VfDy4gWvVcplAtjgzkLEBBz53lu2Diws0DKZl7fZyZKHhjsoI86Os JtpFxkBihiL5yCNg3NKkFpk3/CsO6KZZtmyX2WU= X-Received: by 2002:ac8:5b96:0:b0:3f7:fe24:d8c1 with SMTP id a22-20020ac85b96000000b003f7fe24d8c1mr820378qta.12.1686292492187; Thu, 08 Jun 2023 23:34:52 -0700 (PDT) MIME-Version: 1.0 References: <20230609043240.43890-1-irogers@google.com> In-Reply-To: <20230609043240.43890-1-irogers@google.com> From: Namhyung Kim Date: Thu, 8 Jun 2023 23:34:41 -0700 Message-ID: Subject: Re: [PATCH v3 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 Hi Ian, On Thu, Jun 8, 2023 at 9:32 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. > > 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 Acked-by: Namhyung Kim Thanks, Namhyung > > 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 >