Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp458944rbb; Sat, 24 Feb 2024 07:48:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUj0ljK0vbMbDPPn8pg+R7QWNw+WbH8DgS1hVSzE5GCD3LhsQ00v86ueSG5pPof/2tjQ2hBzZeyzkYqHY+EBxU+/XAMXX1UXz2RN1idyw== X-Google-Smtp-Source: AGHT+IGT679CINJNo8pXCzp5ppNxMSo8p7PZyZiqFfZu1JyxcuUjEv3WpSjL7urDatJ4TppCj/wB X-Received: by 2002:ac2:414e:0:b0:512:f472:702f with SMTP id c14-20020ac2414e000000b00512f472702fmr746466lfi.23.1708789690128; Sat, 24 Feb 2024 07:48:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708789690; cv=pass; d=google.com; s=arc-20160816; b=LI1Bp82EptOrziOWiX2Etee7gz+3atXAIMvtgsf44nxs+ErYn4QoDNhsjut7lpsiQR Q08CmrvjNpQMfFw7mb9fRnZejQa+OU+g/1flT82l04zA3IBQRwSvAnwXIMS4IWY1WjOt e1ddVVmDX2IWIty0HQiYfeI/8z+FZT65FwWmEUgxaB58+/lnWyGqynasv5nSIt7n4E9Q WATkNqqnLoRdvErfh/q6LlmGPT8HdDeJkN4rvreNuGGwZBNFCaXevCbf1w77kjhedWkw rNEU3fI1FpyuN3tlOd1a73EDygQ6tNy2QzsknKIfzkbaZnZNtImHAAdj+xt/1q12uhDo 26dw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=2G+7RsybiI1/ZLJ6JKFhTlJXoYJHwdS9+N8HRIPBni0=; fh=kbiKnJa7ZygYVf04YkHeXOerjQrxJ/7P8bOPq92JQYg=; b=sQOX8dMwVLiNjkvHBQfwIEYmShfS8d7xmNiFadwqWKXo93pDFrSdERsPKfYXpvJbrv DZj9SWtcoy9SZEEkf3rUmBIAmu0z1FGwiwtTsR9ECHNslb2LCio6ujcsXBTa2e/CFQNo jrhYdACDlMqa9oZ4C61tIXIMzls5N+yTP9GRjQYm7eYZSpHxjP9ACbI8RiaiaW8JlaNw QCd9FSN1n1e7BpMtg5ae1wPeTpaE9Qmo7AndAXm/rakCzEJY/6euZtKUueecQRjCFf22 TiSBURmINRdwCPld++63iU0rkx3+HXOEmuY/mKWDirC2e6n02c2wTm/FchIpIvEFhWpW 3ejQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jGRs+thD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79726-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cz7-20020a0564021ca700b00564c1ac8428si592629edb.273.2024.02.24.07.48.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 07:48:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jGRs+thD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79726-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79726-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DC3D51F21980 for ; Sat, 24 Feb 2024 15:48:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6D9D47773; Sat, 24 Feb 2024 15:48:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jGRs+thD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF91417E9; Sat, 24 Feb 2024 15:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708789682; cv=none; b=lKt04wTMNV48ZFEy5Le4rnZe4MSV8xuxl724WAA69jujgLvFjXDpPBE+EXXtn7SARWFmVEYwrEt3hqa5XfGtcukbP957VJAy7Ioc416JtTniorBi6qEH6N5XWcm9rfGt4eY71KDKzHbcMXm9HenOxQS1BWEaRD1pbBjpAqV1xEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708789682; c=relaxed/simple; bh=AgfceBaBph7sVUR2Dyn5Iudnt1yeQy1TvBMVEfuCNOg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=mdgD7E6H9eFC1yhwIiQao3sVT03DghTc58OfHEouJKYSfbkNjXG+3PpZbWo2nAtOsqyGl3ZLpauT+jboLFy7aFdUTb7vvwoGOZ0HyK8lHjZtJszNFiS3ukfUYhiM/yd3AGuiglBtNCzjAxyRGUuaeMsOTEtFMOBWq+SdSzApKf4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jGRs+thD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1A62C433F1; Sat, 24 Feb 2024 15:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708789681; bh=AgfceBaBph7sVUR2Dyn5Iudnt1yeQy1TvBMVEfuCNOg=; h=Date:From:To:Cc:Subject:From; b=jGRs+thDgYc2Z/T7N/Fu8f+hNqNixXrAff/1MLj1FSVAkW91gg/HPMawZL5VG0h9a oeb2IPch8CcZI8haaHwOrPyOGcfTTmmCHjdys8lQR6F9hs6SMj+8s3wTTADXg7wFNq lV7Bt4Mgk4KheisZz+8YsA5I5jQbCYXcPLfKpqTtTddSsQOXSq9rOPCHcpaKnRR3Fh 6nvIOJgJ080M5x0xaLhjdWUEYuJo9vhR5+GRioqL5oBM66cLAcnD2beU4blxPhqoPh 9TL6cgxII40I7E7IDpi5jawHBZMvgFQD8UYfEJaeAVmRd7zbImC8RmXnWdzwA0pDC8 amwspg7nh49Ew== Date: Sat, 24 Feb 2024 12:47:57 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Stephen Rothwell , Ian Rogers , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org Subject: [PATCH 1/1] perf bpf: Check that the minimal vmlinux.h installed is the latest one Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline When building BPF skels perf will, by default, install a minimalistic vmlinux.h file with the types needed by the BPF skels in tools/perf/util/bpf_skel/ in its build directory. When 29d16de26df17e94 ("perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h") was added, a type used in the augmented_raw_syscalls BPF skel, 'struct timespec64' was not found when building from a pre-existing build directory, because the vmlinux.h there didn't contain that type, ending up with this error, spotted in linux-next: CLANG /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid application of 'sizeof' to an incomplete type 'struct timespec64' 329 | __u32 size = sizeof(struct timespec64); | ^ ~~~~~~~~~~~~~~~~~~~ util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declaration of 'struct timespec64' 329 | __u32 size = sizeof(struct timespec64); | ^ util/bpf_skel/augmented_raw_syscalls.bpf.c:350:15: error: invalid application of 'sizeof' to an incomplete type 'struct timespec64' 350 | __u32 size = sizeof(struct timespec64); | ^ ~~~~~~~~~~~~~~~~~~~ util/bpf_skel/augmented_raw_syscalls.bpf.c:350:29: note: forward declaration of 'struct timespec64' 350 | __u32 size = sizeof(struct timespec64); | ^ 2 errors generated. make[2]: *** [Makefile.perf:1158: /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile.perf:261: sub-make] Error 2 make: *** [Makefile:113: install-bin] Error 2 make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf' So add a Makefile dependency (Namhyung's suggestion) to make sure that the new tools/perf/util/bpf_skel/vmlinux/vmlinux.h minimal vmlinux is updated in the build directory, providing the moved 'struct timespec64' type. Fixes: 29d16de26df17e94 ("perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h") Cc: Ian Rogers Cc: Namhyung Kim Reported-by: Stephen Rothwell Link: https://lore.kernel.org/lkml/CAM9d7ciaj80QZL0AS_T2HNBdMOyS-j1wBHQSYs=U3kHQimY1mQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 3cecd51b239707ba..33621114135ee2c8 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1147,7 +1147,7 @@ ifeq ($(VMLINUX_H),) endif endif -$(SKEL_OUT)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) +$(SKEL_OUT)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) $(VMLINUX_H) ifeq ($(VMLINUX_H),) $(QUIET_GEN)$(BPFTOOL) btf dump file $< format c > $@ else -- 2.43.0