Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3455942rwd; Mon, 22 May 2023 14:11:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zjtOK2PRxcr24958PT63603TnFpOrzEmvA6FqV6YOBznGgMlv9O7xA+KwIQoLJvzI9ThQ X-Received: by 2002:a05:6a00:1505:b0:648:e2c8:c40 with SMTP id q5-20020a056a00150500b00648e2c80c40mr13994198pfu.11.1684789873426; Mon, 22 May 2023 14:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684789873; cv=none; d=google.com; s=arc-20160816; b=EUxTHoj6AzeBFHymr+ORZSWsUiWaN+AY52HLghXranHx3Z3DPWM8rbU4fqB0dP9X5G sAIs0TwudY7TCDCDEFzDg2QLjwgyUZKxoELR33DB7xhEGp97adKvuPm65finsBMY1r+m OuNHJ88fSc651iJ8W2X2WMjMd5/paJwUNCy3LMHfsz7ukM/QijuOU9FaDHyFd0a091AY MYzXjlxT4welvxz+bro5bgeJXpHC2GmCiRl20/uDhTkbSe4FSpEIlbXAgO/ypOKPOPaI nETBQQ2+ZsTz+iuWmjbVN1KoyEKCs8tBBwYkRD851ZZZ4wv/0KhZNG40e94LNOrMUyal rPZw== 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=iR+BWwf4OJyjMqBDmvTGWi3YCxxOLx+95DOCyJVhKPk=; b=lq9zgcxh1uxzJdu8oauTaxplpPIusu5KgdcY9HkPssIgnCZkRqy8pmE4e4BU3SSSkl Fr+aMYoADxxBrlS1CACV3R2DZQ1/JrHTnahIX2+MUphbZcY0muptjbhn9cYZnr90Drs+ JTLzYXyWvzW0IkXEk1JOH6o1wrYdkSVZEN/seznX+cQPw15Txm2fck/gIFIvRLHIcFcS VLdCF+3s/vzdo/fTXu9YRZsA9noP6g6tbyaN478DQhbm7M0R/7Nh5RHdajACgQY7Yh+R sWdA1p5Yv78/fUKNnTFoPwbun0+uP+8wIA8cRz4CMSJkxf4D6fklxLWGn6DWVlk59gVi MznQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xEa2mOQ2; 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 u203-20020a6279d4000000b0063b5f25dd95si5216804pfc.391.2023.05.22.14.11.01; Mon, 22 May 2023 14:11:13 -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=xEa2mOQ2; 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 S234220AbjEVUl1 (ORCPT + 99 others); Mon, 22 May 2023 16:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjEVUl0 (ORCPT ); Mon, 22 May 2023 16:41:26 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E677DB5 for ; Mon, 22 May 2023 13:41:25 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-2532da9e45bso2043879a91.0 for ; Mon, 22 May 2023 13:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684788085; x=1687380085; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=iR+BWwf4OJyjMqBDmvTGWi3YCxxOLx+95DOCyJVhKPk=; b=xEa2mOQ2SU1uUUjttd9udMgRxPuLw8oCfRKbF8vtgTjACLQmxJkg3UlfAOJR42UukM 2ceUcX4VaZ3REotSepvjFLOyzJj6wCM9CXPDxU6j3PR5bc5IPOtAhWh1/oqItWFbKb+l 733AS0+sqdBmKeoiq9rksTo8cQroiIz3l70/cGsIUiBtEeuOHdNHejR/PaQdK6xnsVQJ XUBiLUf1hBSGbYMKJvUzpTcqDcCRL669NjLWUA27uHWUc0BBEx74CIGWM+tl8oxQrIKX XJTY0s8FmyqQUBkNT7x3lSqe4UciisM58DPS/vS7/Hav5LKzuhpyJ7um5LQ/px5A+9Rb Wrkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684788085; x=1687380085; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iR+BWwf4OJyjMqBDmvTGWi3YCxxOLx+95DOCyJVhKPk=; b=BLiqp/LR6k697PxH5Vj/AeI7sQYjk+S0dLZPN1uRKhjDzplx7X2qViWrmZ9hdSTw6I peVdcDW2dAb8sAX4wkSqm/BqrzoU3vmBjks6Rda5FK8CRQ8UVvLplycmc+dakiUrFYHw FXPIrns9pX+NllJrb177JkYUidVQltsEtBCP9VzghuQorpOHqDcPGXdPkoIcOxqV+Q8d YPagvCDoVQLB7Cn31no+iYdc7L8u7JZHFMzEiF3Oq0s2RgHf7Xk1D5MHrD6vez2OqLuJ WrpzhguuyMYh05wU0RyWQicCHFaEpFSJ4kNQ99OwylmcCp3PXluhAFATp9otvg+qt4E3 iUng== X-Gm-Message-State: AC+VfDwBYi22E9ChPtfEY0AV1edRbt5FjCcnffAbyU1Fy3sZuhxK1Uhp V/wXFMrKxJaeRBK2Fazn36QTqwaNUKGP X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:33a6:6e42:aa97:9ab4]) (user=irogers job=sendgmr) by 2002:a17:903:3390:b0:1ae:5474:4c82 with SMTP id kb16-20020a170903339000b001ae54744c82mr2770731plb.1.1684788085354; Mon, 22 May 2023 13:41:25 -0700 (PDT) Date: Mon, 22 May 2023 13:40:44 -0700 Message-Id: <20230522204047.800543-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog Subject: [PATCH v1 0/3] 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=unavailable 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. 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/{ => vmlinux}/vmlinux.h | 10 ++++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) rename tools/perf/util/bpf_skel/{ => vmlinux}/vmlinux.h (90%) -- 2.40.1.698.g37aff9b760-goog