Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp924314rwr; Thu, 4 May 2023 11:23:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZYk/RCtph+18xd8pn4+qOQCde2yrV1qP0IVxZj9jUpIY3Zln6bvq2iNCXa73nKFojlJ6U X-Received: by 2002:a05:6a00:1a89:b0:63d:3a21:b774 with SMTP id e9-20020a056a001a8900b0063d3a21b774mr3408161pfv.27.1683224630203; Thu, 04 May 2023 11:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683224630; cv=none; d=google.com; s=arc-20160816; b=GY5hdO+URE0/gL5XrU6V8styp2mEmz79vJIEGyLA5TQV9IG0ygMO+4C1YJndv1kYrm mU6blu33NoCj3WE0KuyrmHGB9BDvZVA7CSkT1GEMFsvPVkNohxx8w+f2hW6EJO6C1JRB kNPrnO+8gz4CLvlDG/Hefy6G7pCceWai6V2a58NYcoCYvp+kG7qFVeHhLPGpP2tGWMtv LqsL99rQQWvdDOA2OlrxPxCXsI7OGBc3ZXhcpjj0MrW/kh9Tr/Ee2RIW66h+mx1NMgA5 jbtS3tlQeimVTIh1Qp/EkFMXiXQhn6ZoDxnOfyv7mP17kUwwTjeYjfUPHWSDZkuHj/EW RHeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bE3v9ecoqiBKcuVcWHGlYMn8CtU9jein55iA5E08qfk=; b=Ulj4Bwi7duR/AqlO6SjRRbHKvUwumiS3g7szDqNEasBGKhQ4uMJgICZ03dLUMofJT0 WwjQls12hVcWBEksslkQADlqXq6uSEHxrh6opu1Nnwvf0kF5BTDQMxmxh489oLSM9kvt R15hYATKUHToVXDgRrYbATgFRNL8/SCbj9o9RqyGM8y4qkmI09936tcxN9qIkfdBWThM VAQczGdBNn+0PSYUp7mGsc8tIAWLV/hXM0hfBD60/y/r+HOpHME1phTbvArcVIUn6pPu zyegjZh67XP98875Sky1Law68GHZnH0myvvg9uW0KL+KvqY0RQpC1Qv0uwQ5hzDDsBBl hZag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ap8YPEnA; 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 e8-20020aa79808000000b0064359e09cecsi85649pfl.18.2023.05.04.11.23.35; Thu, 04 May 2023 11:23:50 -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=@kernel.org header.s=k20201202 header.b=ap8YPEnA; 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 S229823AbjEDRw0 (ORCPT + 99 others); Thu, 4 May 2023 13:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjEDRwW (ORCPT ); Thu, 4 May 2023 13:52:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2841759FF; Thu, 4 May 2023 10:52:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 922E763634; Thu, 4 May 2023 17:52:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B763DC433EF; Thu, 4 May 2023 17:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683222740; bh=A2w7Y71QqLt52hr0tlxUZFVDq7F6B+lT1dL7dRq4zpc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ap8YPEnAH1XR8SFijaOYftny778ROMrxFYLjCqRYBXknC6lhSv2AffeF+9f4b3n8f 0of9tsL8zKp+0wy8knnjVL4FCUVFbW5fA4ZwnZWJgO6dxWZRFVNdHr4HTCOBWgKqYy UmcaVpn3aa9mSBGLp8z2MVQG3vPVhgDOZd5nRESSbZ+bDrDTCKPS2qu22r7eSLFCdA QDbEAZxEaQ/Ivh4+pibiWAEvqNhCahxXRvbC/QN/9TUuDASCkqf6bkROCHCTpLojDl /15XpTeW0vtNJOj8e2n2YN3Ap7nNG78vyWjctWvxF0gzjMwUGzHG30RVqXUV/8Dd5u CUCj2ANnYyriA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 2368F403B5; Thu, 4 May 2023 14:52:18 -0300 (-03) Date: Thu, 4 May 2023 14:52:18 -0300 From: Arnaldo Carvalho de Melo To: Linus Torvalds Cc: Song Liu , Andrii Nakryiko , Ingo Molnar , Thomas Gleixner , Jiri Olsa , Namhyung Kim , Clark Williams , Kate Carcia , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , Changbin Du , Hao Luo , Ian Rogers , James Clark , Kan Liang , Roman Lozko , Stephane Eranian , Thomas Richter , Arnaldo Carvalho de Melo Subject: Re: BPF skels in perf .Re: [GIT PULL] perf tools changes for v6.4 Message-ID: References: <20230503211801.897735-1-acme@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Em Thu, May 04, 2023 at 10:25:30AM -0700, Linus Torvalds escreveu: > On Thu, May 4, 2023 at 4:09 AM Arnaldo Carvalho de Melo wrote: > > Does building runqslower works for you in this same environment where > > building perf failed? > I don't know, and I don't care. I've never used that thing, and I'm > not going to. > And it's irrelevant. Two wrongs do not make a right. > I'm going to ignore perf tools pulls going forward if this is the kind > of argument for garbage that you use. > Because a billion flies *can* be wrong. I pushed two reverts there that make this back into a opt-in/experimental feature till we fix the issue you reported: ⬢[acme@toolbox perf-tools]$ git log --oneline -3 e7b7a54767a71c67 (HEAD -> perf-tools, acme/perf-tools) Revert "perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL" 6957bdf37a1e6eca Revert "perf build: Warn for BPF skeletons if endian mismatches" 1f85d016768ff19f (tag: perf-tools-for-v6.4-1-2023-05-03) perf test record+probe_libc_inet_pton: Fix call chain match on x86_64 ⬢[acme@toolbox perf-tools]$ Its in: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf-tools Using a vmlinux.h file built by bpftool from the BTF info, be it in a vmlinux file or in /sys/kernel/btf/vmlinux (a RAW BTF file) is used for building the BPF bytecode, using clang: ⬢[acme@toolbox perf-tools]$ head tools/perf/util/bpf_skel/sample_filter.bpf.c // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) // Copyright (c) 2023 Google #include "vmlinux.h" #include #include #include #include "sample-filter.h" /* BPF map that will be filled by user space */ ⬢[acme@toolbox perf-tools]$ So that it can access kernel types and store the type info for those types together with the BPF bytecode, as BTF info, and later use this and relocation records for libbpf to be able to adjust things when accessed data structures change in the kernel and needs adjustments based in both the kernel BTF info (/sys/kernel/btf/vmlinux) and the BPF bytecode being loaded (in its .BTF ELF section). Andrii, can you add some more information about the usage of vmlinux.h instead of using kernel headers? - Arnaldo