Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp2658968qtg; Tue, 4 Apr 2023 05:54:43 -0700 (PDT) X-Google-Smtp-Source: AKy350bLDm/+r5Elz2afYr3P68ahyVPq8FZjIQQecP23HAiNV9iUE1JfeWmzg/m3r+TtnTej30vi X-Received: by 2002:a17:906:e082:b0:930:f953:9614 with SMTP id gh2-20020a170906e08200b00930f9539614mr1985570ejb.1.1680612883109; Tue, 04 Apr 2023 05:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680612883; cv=none; d=google.com; s=arc-20160816; b=pFfjIC2uorUw4JnYrKvE6VWixUEDr1hq2HBrZwSge13ICLCJ80/UUOYlxOXPKpBsJV pbLlfCMDRnfRAloO9WqQteHqjbqGob/4VdA7LSSl+wviKDyDAL9JFfBhKfmzINa52MBI VLPWD3rNBIdkQAPk6pYtM5t9hum3gnkh74HpqvXLlHAg+bzOxAgecwH4OPAhlo9+k4n+ iChom81t79sVtJ8N/qTvtwUp2LStjFeNOt9PXAfIgel2S6RnnlJJlq5MdwvMIPC/hEAd 0XNqlZxCSyYIzX1jVEX3LKbX8kS5/0ebVkQI9bF9ypSC0aEOKaQ5i1L0a/u7kvMOEW8a mfGw== 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=j5a7pTt3ZR20YSVaQjCwIdCHe6lx3npyGc+dHdGgQ8A=; b=iPelZH5O3Cvfhpwl1Ecp/4dBk+LjPvamaBXv5cS9jawd/8CNUVmsylSg4i97e77rYp WbOCohXPyUu+m+VYajIUKxCMSIo/ADgmBY56LEUYVEmVqcWKzj6haATiIEXK1FtuDl+B oenDrU+51CtSm+SCSgnD6T7GHz7n93UW6qT14mMFnFnU0UgZfb2cBZWFdIUIixqbWd4c dlSYNPmeDIU7BWkM4Bp+dHAW3E4RqAxX7vftYPywCVm0LK7wlz+QmfwmD/XGudHu0yWK aFJbRlpoyGqOfgje01H8QuGc9Sxu+Sg4vlnH4plqEMl+wWu1CbVqES2cDI9AGVAHtHg/ GNxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FtpBHWdf; 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 n3-20020a17090695c300b0093e3a33d7easi1771432ejy.451.2023.04.04.05.54.05; Tue, 04 Apr 2023 05:54:43 -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=FtpBHWdf; 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 S234583AbjDDMtZ (ORCPT + 99 others); Tue, 4 Apr 2023 08:49:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234316AbjDDMtZ (ORCPT ); Tue, 4 Apr 2023 08:49:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB65740E5; Tue, 4 Apr 2023 05:49:01 -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 B504463355; Tue, 4 Apr 2023 12:48:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E394DC433EF; Tue, 4 Apr 2023 12:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680612520; bh=QZz3P49jyyA9udOBPFdz1yXkOaOGxvzwkSwnnEX36hM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FtpBHWdfABhDi3H8J8jaAWh5K0OQJA7hBi41/EBFBG/nwG6oqUX8zuR8tzBacmmUA 1J7DEN2RC/5wT4TENsfme4zGNw2YMXXC6GMYu94EP7cEil2RA8s5G5ajbMEMLpQUEp 8S2+vGwZJDfWYbSJ/1ZemzVLiagEv2g9TP5eST3uRQ3eL7qWXzisAlrQ3hSiFO9bsi PRGf+xbRASJMr7HsGKiiUleo5du+3EhAoKyKB7kgspiU5lUlWltodfg4F5jDIyn6bE /7QhB9HhILqj6kNDyfv0adqKyu4dspPyeg5EE69HCZ19BUpTNRjP6EaBe8jye/MgZj /c7lGeYJGZzrg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 778664052D; Tue, 4 Apr 2023 09:48:37 -0300 (-03) Date: Tue, 4 Apr 2023 09:48:37 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2 0/4] Support for llvm-addr2line Message-ID: References: <20230403184033.1836023-1-irogers@google.com> 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=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Mon, Apr 03, 2023 at 10:18:47PM -0700, Namhyung Kim escreveu: > Hi, > > On Mon, Apr 3, 2023 at 1:24 PM Arnaldo Carvalho de Melo wrote: > > > > Em Mon, Apr 03, 2023 at 11:40:29AM -0700, Ian Rogers escreveu: > > > The addr2line command is started and then addresses piped to it. In > > > order to determine the end of a addr2lines output a ',' it output with > > > an expectation to get '??\n??:0\n' as a reply. llvm-addr2line differs > > > in that ',' generates a reply of ','. > > > > > > The approach detects and then caches the addr2line style. When records > > > are read the sentinel is detected appropriately. > > > > > > Comparing the output there is a little more inline data on my machine > > > with llvm-addr2line: > > > $ sudo perf record -a -g sleep 1 > > > $ sudo perf report --addr2line=addr2line > a.txt > > > $ sudo perf report --addr2line=llvm-addr2line > b.txt > > > $ wc -l a.txt b.txt > > > 12386 a.txt > > > 12477 b.txt > > > > > > Some other small changes, switching to the api/io code to avoid file > > > streams wrapping the command's stdin/stdout. Ignore SIGPIPE for when > > > addr2line exits and writes fail. > > > > > > v2. Address review comments from Arnaldo and Namhyung, fixing a > > > realloc error path, argument ordering and a comment. > > > > Added to local repo, build testing, will be in tmp.perf-tools-next soon. > > > > - Arnaldo > > > > > Ian Rogers (4): > > > tools api: Add io__getline > > > perf srcline: Simplify addr2line subprocess > > > perf srcline: Support for llvm-addr2line > > > perf srcline: Avoid addr2line SIGPIPEs > > Acked-by: Namhyung Kim Thanks, added to those patches. - Arnaldo