Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3655684rwd; Mon, 22 May 2023 18:09:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KtG1HL5HQdj77R4ppLMsQH843sIUwwIxfwhz315LVDphcu2De7YCUc/0+fofjyqTEni6y X-Received: by 2002:a17:902:da90:b0:1af:beae:c0b with SMTP id j16-20020a170902da9000b001afbeae0c0bmr3261518plx.22.1684804198443; Mon, 22 May 2023 18:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684804198; cv=none; d=google.com; s=arc-20160816; b=CfiJk7GHivz8KFGxLQOU2hcNYIh7r1ijZZ59KBZz6XGgHe7csJE9kqvpE2AoXs862s MePrDXJitm7Oz44xTootm6dIsBppYdJanKaR9kVSSOu2fK1lc5Qb2YCY9PNksFWe37Sp CjpejilT4CA9iV2bBRiZ92wAPoz2jWIaelKtAxBUJk1I8lqWepQXcuiVdHDbAW8WhYFi j8buWLL6v+Vhf3naN0GtIR/26+n57NeBhfju8LOQ+BUaCKjHEmEo1r3L/Us01lv4y69r e8xVrUqnG0a/Sk/dBOHrjQxCzXNvDkTa77wNQ58JbXEtJU1qaII7PdlJrPCO3RZAEJAZ iEYQ== 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 :dkim-signature; bh=VotVH7DG8ufofu7FwiCmchyX5+I82ZeYrFOs3jDvenI=; b=ryW/6nXZReE338LgEimdQFJ3wLjaya/vg3R/D2VFzDeAeGFKco3R3zVR3KsgatCJOv R2f9meebm+BuUTFCJWpzIXC7toS1hTgGZITma3Xh3NcxsTxruG61dezIvjRojR2wta8c bM8PkoCXFXTheYtsBzfuiTooJnP46Hfi1XpavoV7gb1PDnoV2EENCoiKVTwP7lz12QBa tUPb6/nDhl3NMB0Rg4iaBr1KTlEBIIFWl/U/HUq77TZ9ke66/TurhbGFvt4eL1Co5y5K cx3Yn+GOnCrpAxuvYONbqZvlxa/duAsKyKpAUCgI1jGbUDnEcbhBm/BjuMuMCBwmVr7h c7PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jSKSNoY7; 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 t185-20020a6381c2000000b0053b29394937si1353393pgd.816.2023.05.22.18.09.43; Mon, 22 May 2023 18:09:58 -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=jSKSNoY7; 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 S234956AbjEWAjG (ORCPT + 99 others); Mon, 22 May 2023 20:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235505AbjEWAUI (ORCPT ); Mon, 22 May 2023 20:20:08 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5EE1173D; Mon, 22 May 2023 16:35:30 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-510d8ead2f1so295200a12.3; Mon, 22 May 2023 16:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684798529; x=1687390529; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VotVH7DG8ufofu7FwiCmchyX5+I82ZeYrFOs3jDvenI=; b=jSKSNoY7Q0o/FX/zQftnhRD1701iNyP8zQnaHrvNK6bOhHVeEqoz3tBT+gkEnHOqZW AQZ6Dv6V2ofGxlmb5xVvKgu9gYDOvyilqMDZwAyAr1ACyuP57WmVjQczfRO2VbcqNg5+ s5nVzFEG16bmn4cY/6GDa0bGcUK6xbBLAzOBPS/zdtJPUpzAKAByIrdcA6ejSc7UeEoZ 2uXNnHjt+1fBW5Sbox5zRAHAoNqkQ+QeXejiPfW/RY1RO1h0jhgpX5khuQenES99xzXv hZsfoO5OsiXXkJSOOwAHyFV4pKUVXouj6o/fnZIulzp3aWN3buPzWPLy3oXxcg0MKt4O M/ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684798529; x=1687390529; 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=VotVH7DG8ufofu7FwiCmchyX5+I82ZeYrFOs3jDvenI=; b=AtSYpbx2Te2mSK4Ho0dgr182CTdFf0UqX6Ott1HgS4KyGEtdV9jtAfE66bG572i4eA OzvdG7/TjHGyjPA50sHFbLBbadRr4t2lpuCK3R21ydoMtaXHUnqk6+S5xRKY/L8aJx+N i4gETDyfysL4SnuayjViblowK9dGTU9lhCEO5qy89S9Ff/xXusyUcdHgNDZrQBBiiCFq //ACQWcZIgh5ZCfSCcBxijxyTj4G5DZQkNBQ6boTDnq7i7Dz8Z0i2CidPsZF/FZQrX+l sR6OJlH8M+WE5j5GoyOY7pQWs6f6ihscaikLDOQ+Gy985YTnKZKBhNGphl9cjA8ZQUvK J4Bw== X-Gm-Message-State: AC+VfDy3Mpdi45Zoci2glI1deW+zBEd1jsUVZq+vSpTugasb/KJTXI4I nPMgf4CSj/e7yxZ4ikiLZreV4HgGqwYYbdyo0zI= X-Received: by 2002:a17:907:c21:b0:967:5c5f:e45c with SMTP id ga33-20020a1709070c2100b009675c5fe45cmr13647491ejc.0.1684798528988; Mon, 22 May 2023 16:35:28 -0700 (PDT) MIME-Version: 1.0 References: <20230522204047.800543-1-irogers@google.com> In-Reply-To: <20230522204047.800543-1-irogers@google.com> From: Andrii Nakryiko Date: Mon, 22 May 2023 16:35:16 -0700 Message-ID: Subject: Re: [PATCH v1 0/3] Bring back vmlinux.h generation To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Mon, May 22, 2023 at 1:41=E2=80=AFPM Ian Rogers wro= te: > > 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 definit= ion 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. > > Ian Rogers (3): > 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 > > tools/perf/Makefile.config | 4 ++++ > tools/perf/Makefile.perf | 16 +++++++++++++++- > tools/perf/tests/make | 4 ++++ > tools/perf/util/bpf_skel/.gitignore | 1 + > tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 -- > tools/perf/util/bpf_skel/{ =3D> vmlinux}/vmlinux.h | 10 ++++++++++ > 6 files changed, 34 insertions(+), 3 deletions(-) > rename tools/perf/util/bpf_skel/{ =3D> vmlinux}/vmlinux.h (90%) > > -- > 2.40.1.698.g37aff9b760-goog > > LGTM, for the series: Acked-by: Andrii Nakryiko