Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6155241rwd; Mon, 5 Jun 2023 14:01:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ODoBgqCTWAKmnhQHHXUeUfYtG96OvmpwPIMVuba6OxPy+ZMyuKseGPY10Y65grzVrddQu X-Received: by 2002:a1f:5f4d:0:b0:462:7eb0:6fe with SMTP id t74-20020a1f5f4d000000b004627eb006femr3223825vkb.13.1685998919641; Mon, 05 Jun 2023 14:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685998919; cv=none; d=google.com; s=arc-20160816; b=VNpap0wAZtzp4GWsdJ96xyCDionWfEzbHReTKpbd651d4RPGqRouEPLhAwq/lNkJwE OnchdbHSCp53mPXxA8zx8iVBbQF6bYO6A6+svISW5+N+kJuj80CoWvReSx4XXS23eBtO gdpYFx5qpukbT7b5fJdf++rYJvFn9Z6/Mu20K3SXbglogZfy6j6+kjJnvfIxx5XdNJml 2WGPNDjSd/Alr61WG11/XGgwFMjymTBPe26mhLQhGHLME66z13iDdfrRoDwUUe1/ZhJv zrBZOLnXg0fUjMI4TStPpw/o28TqrflcmpE9yU79c+kAbNPM6EGFCYbS5x1fJHAcLwLO kbxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:mime-version:message-id:date :dkim-signature; bh=XnxfahBFhDdYZkXlZPUfdWCh0pSs+dY9UekTfoE8XFc=; b=W9WvgbPQ1pqWNwQI6W7XufxsAmNl/pizOO3IU9R4OnMXtEr1sclSO+8JLVAwVOlpih EUiIHzsQZ3GDFVP4HCxUI66O1wG8BNpLO+gF5vPbAA5mStqA0WlnLfmg+akHKVreNozD hfoBTxPRIDUHsjNA2ZXrHL5qWPzcyTAO1YVxA/OD3w15OK9UIqIxMulR5J0KpN7pDfzb 8Anmju7o7vaOPSvruRy+MpE1F1Sl3hETB0Jq8gIhXs9Nb6b8jIzHAFBxuhwZ5Y7jPWGb QvOHnZt+AEEPjj7nA9hRbOenon7LRl/jJhdwmyc/T0gSRVKZpUubRnQ4X1GHRJsnbUBX tyOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Q9T10dtn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q29-20020a05620a039d00b0075e14e66f97si1894288qkm.639.2023.06.05.14.01.43; Mon, 05 Jun 2023 14:01: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; dkim=pass header.i=@google.com header.s=20221208 header.b=Q9T10dtn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbjFEU2Q (ORCPT + 99 others); Mon, 5 Jun 2023 16:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjFEU2O (ORCPT ); Mon, 5 Jun 2023 16:28:14 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C3E898 for ; Mon, 5 Jun 2023 13:28:13 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-53b9eb7bda0so1933520a12.0 for ; Mon, 05 Jun 2023 13:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685996893; x=1688588893; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=XnxfahBFhDdYZkXlZPUfdWCh0pSs+dY9UekTfoE8XFc=; b=Q9T10dtnVViuYX7PiAM77gTQR0mNL3l97CIumpOUFIVSRAIJxcSd3D2ssFddid/ZER 4yvhaKqX+CXtWJOEEHsIF1yDBSZMgW+3U2Dg0QjFQ55IN/igthyx8QVzi7TuPneZdMSo qBwAdbSf3nSWBH6RfewrhomP/I0PC2ahg28AHryNHnChrBkmAhLkUpbUku9HyU3wCGE5 ZrrC6SF/Tn+Z0D4LZdyOmwPRCfQS2rkd8UCnKCqnnJLzFS3Q+Tmbf6YTv1J+HigoQAk3 w8f7zo+pYQdVXX3jPv76zrwHgJEmr0M4X8TE03/0WaKp1+pSCpmpu4tGo/rWgZjL1i6y DVOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685996893; x=1688588893; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XnxfahBFhDdYZkXlZPUfdWCh0pSs+dY9UekTfoE8XFc=; b=TTkQSl7lOUuaIHVmWeQSdUBuyOoIRDGoudD0Id9L5OeIZOIXFpR5luFUNp0UfF1Iht 3r6UivaEYoUNQDfwV9xuxnnwlDWXAFoGcUjyxOAhhHpVjsmAfb34rRz89qAkwQ5dXWfX vlCzikAfVzcGYHiWzn02iF7HKG98bT6d+HhJq8ho3JNILbPhwb8HdlGF+PhjHrnfPwpA swGT9eqbT2dif7W61DZ07R88oKt5iCbJrv3FeWzjA98jL/j1y3UKM8TuDTEFx2OO1fSr rZ18fPLK7q2oXo9rbrxUvNC2Ltp9ze3aNt/T7i4eLwbjFhMIcCQ63DuoXHYaQxIqUUbB 5hnw== X-Gm-Message-State: AC+VfDwJDsM1woGGLiqgdvPL2xnXmH5tGIdBJUZZ+W6NeD135R1q2yoS hj3LvyFNnLAKGrNA2oAwXz2+kNu99zkL X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:bed9:39b9:3df1:2828]) (user=irogers job=sendgmr) by 2002:a63:f14c:0:b0:52c:4227:aa61 with SMTP id o12-20020a63f14c000000b0052c4227aa61mr193290pgk.6.1685996892776; Mon, 05 Jun 2023 13:28:12 -0700 (PDT) Date: Mon, 5 Jun 2023 13:27:08 -0700 Message-Id: <20230605202712.1690876-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog Subject: [PATCH v2 0/4] Bring back vmlinux.h generation From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , 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" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 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. 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 | 33 ++++++++++++++++++- 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, 51 insertions(+), 3 deletions(-) rename tools/perf/util/bpf_skel/{ => vmlinux}/vmlinux.h (90%) -- 2.41.0.rc0.172.g3f132b7071-goog