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=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 350CCC47082 for ; Thu, 3 Jun 2021 14:57:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17486613F3 for ; Thu, 3 Jun 2021 14:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbhFCO6w (ORCPT ); Thu, 3 Jun 2021 10:58:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:45826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbhFCO6w (ORCPT ); Thu, 3 Jun 2021 10:58:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31DEC613E3; Thu, 3 Jun 2021 14:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622732227; bh=iOSsgdS8c3kqEElZXShIq5hdaRoypd8OdXLk+YarE4s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EUi52X8SPTuvnRTGydOz6BRMR4SQQygG+SnLv5WSNqoyYxW2hxPHfwqGMrYUeaOos xg4ZI/8FT7kU6xm28ztz6fn3Vx/k7Hg3DgM8nxEsaKq9hJAc71ieorXRO/D2oVxmW2 lV8I943qSlduCRCqfzRo9KX3v8muII+wU2NmARIaENVjs+2VsRg7wKbooV+N64JAok DrVNDBamE+TSJvLjsLUIwf9pW2oWzJcnEq8db2gOWZck3UeT9EiZJiscntDsaxpuey ZnAbYYkAMgKODxGQtr3cKOE+41qeDZRf1bbni0DuYSE7syYb55qXK9CGdNtWVHQekY sxZMif5FO8/lA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9D1EA40EFC; Thu, 3 Jun 2021 11:57:04 -0300 (-03) Date: Thu, 3 Jun 2021 11:57:04 -0300 From: Arnaldo Carvalho de Melo To: Andrii Nakryiko Cc: Andrii Nakryiko , Jiri Olsa , dwarves@vger.kernel.org, bpf , Kernel Team Subject: Re: [RFT] Testing 1.22 Message-ID: References: <4615C288-2CFD-483E-AB98-B14A33631E2F@gmail.com> <4901AF88-0354-428B-9305-2EDC6F75C073@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: dwarves@vger.kernel.org Em Sat, May 29, 2021 at 05:40:17PM -0700, Andrii Nakryiko escreveu: > On Fri, May 28, 2021 at 12:45 PM Arnaldo Carvalho de Melo wrote: > > commit b579a18a1ea0ee84b90b5302f597dda2edf2f61b > > Author: Arnaldo Carvalho de Melo > > Date: Fri May 28 16:41:30 2021 -0300 > > > > pahole: Allow encoding BTF into a detached file > > > > Previously the newly encoded BTF info was stored into a ELF section in > > the file where the DWARF info was obtained, but it is useful to just > > dump it into a separate file, do it. > > > > Requested-by: Andrii Nakryiko > > Signed-off-by: Arnaldo Carvalho de Melo > > > > Looks good, see few minor comments below. At some point it probably > would make sense to formalize "btf_encoder" as a struct with its own > state instead of passing in multiple variables. It would probably also Take a look at the tmp.master branch at: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/log/?h=tmp.master that btf_elf class isn't used anymore by btf_loader, that uses only libbpf's APIs, and now we have a btf_encoder class with all the globals, etc, more baby steps are needed to finally ditch btf_elf altogether and move on to the parallelization. I'm doing 'pahole -J vmlinux && btfdiff' after each cset and doing it very piecemeal as I'm doing will help bisecting any subtle bug this may introduce. > allow to parallelize BTF generation, where each CU would proceed in > parallel generating local BTF, and then the final pass would merge and > dedup BTFs. Currently reading and processing DWARF is the slowest part > of the DWARF-to-BTF conversion, parallelization and maybe some other > optimization seems like the only way to speed the process up. > > Acked-by: Andrii Nakryiko Thanks! - Arnaldo