Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp964084imj; Fri, 15 Feb 2019 09:41:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IYSJbdBueMEmL9IYj80Hu/3qOqaiymLl5zriqiS2PUqsP6XSsiCxEhXgfFPSdIztXOVeegd X-Received: by 2002:a17:902:9893:: with SMTP id s19mr11466004plp.165.1550252475349; Fri, 15 Feb 2019 09:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550252475; cv=none; d=google.com; s=arc-20160816; b=RtyX4BOa8bo+Y/wJCs88zfjtc14SKS3UaIl4AI9MD3Ik54An8+zrZxXzVZk+LyboXW cQNcNEK4aVbWIac8UwJSrBCcfLXEviJLU9gYbKGG0kjNYCGs7WYOVIULXQ1TgSQ3zg6p /9UrGUkZaBWdxRIb4HDlAhywx8qMttnzppVYtf+Rws9BcGBSb4wCanCcUgajVvdq+TsQ z9XOBS0ADXWi7IprI+9S3oDVunHxhDmvdKdI0wDMrPVYT92Sm8ehpeo8A/vfZfpdGzHu PFPWyHDbYu1urUuH3s/ZMaSEetrkI/AA8IMjKjP7t9828nIjz8JkTyvDwE956BBHHUpv ZlZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xWy/sx7CJwtzfd25AoIjRRwuQYEiPIgELi3LNxdznLM=; b=RsNCSOYJY+2klgGoXByYYXq0KJknIRvPTh3WO0jjjGJtZumdDfVtWhbcBiu66RAkVx f8rp7JAqPiWX7/FAA9ZfYHIWMNsCV8y6+qN34VFIatG04bKqPues1wIWerFlj9Ni3GAN Vg4PpmFxHz6IPU1NwYtfvy7l27SjC4lVcJOUuHXflem6OcAoteRfVtZYZbE5f51pG7a7 ZEJ13pNzS5v2M+R/nExXiCKeYSU1MR6kiZTzc3hU21WFarUmtRshziAD5xqSfpXhz9M1 wk8YLnmASsiFHSdYs96wq4MWX2/VEVG/RhhMQjTKc8ZbAHTI1d6XSEeLeDYhHnuVJLt1 XDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G23YUzjH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si6053179pgd.189.2019.02.15.09.40.58; Fri, 15 Feb 2019 09:41:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G23YUzjH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729946AbfBORk0 (ORCPT + 99 others); Fri, 15 Feb 2019 12:40:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:60500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbfBORk0 (ORCPT ); Fri, 15 Feb 2019 12:40:26 -0500 Received: from quaco.ghostprotocols.net (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7CDD021927; Fri, 15 Feb 2019 17:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550252425; bh=lreoIhKhqt95ydEmV/ZvnxPIBxtK+WuOuVWQ4ti4bYg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G23YUzjHkvcXBGrmtCYoAhdlf6/nGCiG/a4RClxKTxQUrfyGDyFKb2/xZ4rcjiKtY EoHY1sMAA65dznykSDWko48l6udXjwl1ffFJI4KHYSiP/khOZ5qKjdZGywHJCZUdH7 GLD0Qcdj1f9dS0sIup0MPHRgBQYvZtNMB+8+g7Gk= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id ACFAD410D5; Fri, 15 Feb 2019 14:40:22 -0300 (-03) Date: Fri, 15 Feb 2019 14:40:22 -0300 From: Arnaldo Carvalho de Melo To: Song Liu , Jiri Olsa , Stephane Eranian Cc: Netdev , linux-kernel , Alexei Starovoitov , "daniel@iogearbox.net" , Kernel Team , "peterz@infradead.org" , "namhyung@kernel.org" Subject: Re: [PATCH v2 perf,bpf 08/11] perf, bpf: save btf information as headers to perf.data Message-ID: <20190215174022.GF31177@kernel.org> References: <20190214235624.2579307-1-songliubraving@fb.com> <20190215000010.2590505-1-songliubraving@fb.com> <20190215000010.2590505-7-songliubraving@fb.com> <20190215142643.GC5784@redhat.com> <164D19ED-EA72-4A56-8259-FCF13894B183@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164D19ED-EA72-4A56-8259-FCF13894B183@fb.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Feb 15, 2019 at 05:25:01PM +0000, Song Liu escreveu: > > On Feb 15, 2019, at 6:26 AM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Feb 14, 2019 at 04:00:09PM -0800, Song Liu escreveu: > >> This patch enables perf-record to save btf information as headers to > >> perf.data A new header type HEADER_BTF is introduced for this data. > > Wouldn't it be better for this HEADER_BTF to be introduced > > already as an user space event, Song, see: > > tools/perf/util/event.h > > and: > > tools/perf/util/event.c > > perf_event__synthesize_cpu_map() > BTF would be short living for short living BPF programs. I guess > saving them as header is easier than merging them with samples. > What's the benefit of saving them as user space events? When we work with pipe mode, i.e.: perf record -o - | perf report -i - and other combinations (with 'perf script', 'perf inject', etc), we need a way to pass the headers to the other side, and the way was via user space events. This is something Stephane and Jiri have been discussing recently, probably they have more justifications, Stephane, Jiri? - Arnaldo