From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A1B6C10F14 for ; Thu, 11 Apr 2019 16:30:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C8D02133D for ; Thu, 11 Apr 2019 16:30:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="ciY2xhZB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726676AbfDKQal (ORCPT ); Thu, 11 Apr 2019 12:30:41 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35852 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfDKQak (ORCPT ); Thu, 11 Apr 2019 12:30:40 -0400 Received: by mail-pf1-f195.google.com with SMTP id z5so3713870pfn.3 for ; Thu, 11 Apr 2019 09:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yz6p7JxlGvdeQQLGjhJ9bVaviFTo9O5jKlmLBrtPSxc=; b=ciY2xhZBqrGVRamWEdyXZm+HVDPPv1+F+OLeHjR7pw4dh1Z2uCIqi7kX9QZ2Nw2fSe 3ICSpeJP/1tWvICZXWQjFcCvyAiDNg/RWPWz1whH81jzBceC9pLheMqVAmvugn81KSKm 4FTMZrgv8NDSEen6g28eGD9Axz7uKBQR2aoSA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yz6p7JxlGvdeQQLGjhJ9bVaviFTo9O5jKlmLBrtPSxc=; b=q6hDOoJqbL2xRT15/hvLn2ZBtJexjxjztYCu6lgNuaxK+TowlS+7Xxq+PlpdLpnImO SYU6JL4GkCAuRjhWnep7syIS3bLH/7TCdYqHnN0/jQ2z4yBONBuikHPS0Y2jeUrs4BRX njPcML5dv9SgpIShImd0OfZYI58sJOx147xnFBBrap0LoidKUZxHm1Svmwokbe3v3cTB A7ZsxlH+I0hIG5j7PvXde3Kh5s6sPIZ+1ebiNv+BsHelEFGcQGtzPgICF6DgRP9cGkJx z8cQ0XM0Ry7PimAcNvjxofer28GHjy8eVi1ojPlLXa0qwmEnAPyU2vIiJBz0ZSq/kP2E QGDg== X-Gm-Message-State: APjAAAUMlwosz9AIiPWDYkRiRfM0gmt1YY0zEnhKlxvuqfneZt5MmSGv AhBm86hwrADe7EjEWrc/ubAutw== X-Google-Smtp-Source: APXvYqznku4Y+edVIheLFiiF6i3mDId8Ozb9gEBivSsdoVik00tTyZSUXFIO+ELMlApiyFEVjPbdZQ== X-Received: by 2002:aa7:82d6:: with SMTP id f22mr50947455pfn.190.1555000239933; Thu, 11 Apr 2019 09:30:39 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id h20sm52286114pfj.40.2019.04.11.09.30.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 09:30:38 -0700 (PDT) Date: Thu, 11 Apr 2019 12:30:37 -0400 From: Joel Fernandes To: Alexei Starovoitov Cc: Olof Johansson , Linux Kernel Mailing List , Qais Yousef , Dietmar Eggemann , Manoj Rao , Andrew Morton , Alexei Starovoitov , atish patra , Daniel Colascione , Dan Williams , Greg Kroah-Hartman , Guenter Roeck , Jonathan Corbet , Karim Yaghmour , Kees Cook , Android Kernel Team , "open list:DOCUMENTATION" , "open list:KERNEL SELFTEST FRAMEWORK" , linux-trace-devel@vger.kernel.org, Masahiro Yamada , Masami Hiramatsu , Randy Dunlap , Steven Rostedt , Shuah Khan , Yonghong Song Subject: Re: [PATCH v5 1/3] Provide in-kernel headers to make extending kernel easier Message-ID: <20190411163037.GA5786@google.com> References: <20190320163116.39275-1-joel@joelfernandes.org> <20190408203601.GF133872@google.com> <20190411031540.ehezr6kq7ouobpzx@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411031540.ehezr6kq7ouobpzx@ast-mbp.dhcp.thefacebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org On Wed, Apr 10, 2019 at 08:15:42PM -0700, Alexei Starovoitov wrote: > On Wed, Apr 10, 2019 at 09:34:49AM -0700, Olof Johansson wrote: > > On Wed, Apr 10, 2019 at 8:51 AM Joel Fernandes wrote: > > > > > > On Wed, Apr 10, 2019 at 11:07 AM Olof Johansson wrote: > > > [snip] > > > > > > Wouldn't it be more convenient to provide it in a standardized format > > > > > > such that you won't have to take an additional step, and always have > > > > > > This is that form IMO. > ... > > Compared to: > > - Extract tarball > > - Build and load > > - Remove file tree from filesystem > > I think there are too many assumptions in this thread in regard to what > is more convenient for user space. > I think bcc should try to avoid extracting tarball into file system. > For example libbcc can uncompress kheader.tar.xz into virtual file system > of clang front-end. It's more or less std::map > with key=path, value=content of the file. Access to such in-memory > 'files' is obviously faster than doing open/read syscalls. > bcc already uses this approach for some bcc internal 'files' that > it passes to clang during compilation. > All of /proc/kheaders.tar.xz files can be passed the same way > without extracting them into real file system. > > Joel, would be great if you can share corresponding bcc patch > that takes advantage of /proc/kheaders That sounds good to me. Others have tested this with BCC with a manual extraction and setting environment variable to point BCC to the extracted location, but I can work BCC patch that makes this automatic and share it (I was planning to do the "automatically make BCC do it" patch for the BCC project, but first wanted this in. But I agree with Alexei, its a good idea to do it now and share it). Masahiro had some nits in v6 that I need to address anyway ;-) And Olof grumbled a bit about the commit message which could be polished a bit more :-) thanks! - Joel