From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dd14210.kasserver.com (dd14210.kasserver.com [85.13.138.83]) by sourceware.org (Postfix) with ESMTPS id 0C85B3858D37 for ; Tue, 9 May 2023 18:02:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C85B3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=milianw.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=milianw.de Received: from milian-workstation.localnet (p4fd6c032.dip0.t-ipconnect.de [79.214.192.50]) by dd14210.kasserver.com (Postfix) with ESMTPSA id A90502407D7; Tue, 9 May 2023 20:02:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=milianw.de; s=kas202303061152; t=1683655360; bh=R2zjguhHuCXPHGCG5wIHRrfryr2Ky5nsQ1FDUnRDXAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N44d4d3MInT8nxDq50REKLqQo9lEXJWRxeurAn5cqAHeGBcVaWLBgRdE0XOIkYXPw l2ERI566wXPiddlhRn9Zb/rj6bRLN/5NpAcFHosTWXTeCL9dmKnYJZgG5wLco+AF13 tkHSBmfUfPVBMllfC5aqF4otavP3kmeQ9vlJAAgqH6iAjnjCljtK06Ouyn69s4uVTB tRNfSH2CWzNU5RKZj3YUyDbxk3Mx1wLOct023ZhPQIinTSpaC4aPRMaZl+PUydIgXI 14cTmGVuDb7HkKv7in1/wUYMCVbeMwzWYj7g/nv198EkrmgOXk3ogna5Eqz1sJRMhT 4ru6PTUAowMZQ== From: Milian Wolff To: elfutils-devel@sourceware.org, Serhei Makarov Cc: fche@elastic.org, mark@klomp.org, chergert@redhat.com Subject: Re: eu-stacktrace: roadmap and discussion thread Date: Tue, 09 May 2023 20:02:39 +0200 Message-ID: <3375729.uvHT6U3Wrp@milian-workstation> In-Reply-To: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> References: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1961688.ES8HNk12Op"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Spamd-Bar: - X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,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 server2.sourceware.org List-Id: --nextPart1961688.ES8HNk12Op Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Milian Wolff To: elfutils-devel@sourceware.org, Serhei Makarov Cc: fche@elastic.org, mark@klomp.org, chergert@redhat.com Subject: Re: eu-stacktrace: roadmap and discussion thread Date: Tue, 09 May 2023 20:02:39 +0200 Message-ID: <3375729.uvHT6U3Wrp@milian-workstation> In-Reply-To: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> References: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com> MIME-Version: 1.0 On Montag, 8. Mai 2023 14:33:57 CEST Serhei Makarov wrote: > Hello all, > > I wanted to open up public discussion on a project I'm looking to > develop in elfutils, tentatively named eu-stacktrace. I've started to > write code on branch users/serhei/eu-stacktrace. > > eu-stacktrace will be a utility to process a stream of raw stack > samples (such as those obtained from the Linux kernel's > PERF_SAMPLE_STACK facility) into a stream of stack traces (such as the > ones obtained from PERF_SAMPLE_CALLCHAIN), freeing various profiling > utilities from having to implement their own backtracing logic. > > My initial goal is to make the tool work with a (slightly modified) > version of the sysprof profiler. If all goes well, I hope to produce a > demonstration of sysprof using elfutils eu-stacktrace and eh_frame > data to produce useful profiles on code compiled with > -fomit-frame-pointer. (I'm aware of the problem of profiling > -fomit-frame-pointer programs being a topic of some fairly contentious > recent discussion, which I'm not looking to rehash; I'm just > interested to see if I can add a viable technical solution to the > mix.) I'm cc:ing chergert and posting a link to this thread on > GNOME Discourse so that sysprof developers can keep track of the > discussion. > > For the time being, eu-stacktrace is meant to be fed data from a > profiling tool via a pipe or fifo. We will see how well this idea > works as implementation proceeds. > > The eventual goal is to work with various profiler data formats. After > sysprof, supporting perf's native data format is an obvious > prerequisite for merging the users/serhei/eu-stacktrace branch into > elfutils. Ideally, I would like for eu-stacktrace to also convert > between different profile data formats (e.g. taking sysprof data as > input and emitting perf data, and vice-versa), but this may be > out-of-scope given the amount of code that would need to be written to > handle profile data other than stack traces. Hey Serhey, sounds like a fun project. If you want to see some prior art in that area, do have a look at perfparser [1], esp. [2], and [3]. We solved quite a few of the problems you might encounter in this area. Esp. for good performance, you'll need quite a bit of caching on the stacktrace side, such as [4] and [5]. [1]: https://codereview.qt-project.org/gitweb?p=qt-creator%2Fperfparser.git;a=summary [2]: https://codereview.qt-project.org/gitweb?p=qt-creator/ perfparser.git;a=blob;f=app/ perfunwind.cpp;h=9c09740c756beabac43b45ed6f34bbcfc77e0860;hb=refs/heads/master [3]: https://codereview.qt-project.org/gitweb?p=qt-creator/ perfparser.git;a=blob;f=app/ perfunwind.cpp;h=9c09740c756beabac43b45ed6f34bbcfc77e0860;hb=refs/heads/master [4]: https://codereview.qt-project.org/gitweb?p=qt-creator/ perfparser.git;a=blob;f=app/ perfaddresscache.cpp;h=8ff26d09a71aff0343378ff062c8fb2fcf601c08;hb=refs/heads/ master [5]: https://codereview.qt-project.org/gitweb?p=qt-creator/ perfparser.git;a=blob;f=app/ perfdwarfdiecache.cpp;h=10e432e64cdce6c5e9e6a72a49a1cd73ddb9e7ce;hb=refs/ heads/master Good luck! -- Milian Wolff mail@milianw.de http://milianw.de --nextPart1961688.ES8HNk12Op Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAmRaisAACgkQ8zYW/HGd OX9o5RAArwORazFkjEtoSYsTYxSTTR9WoMs8TczAjXOYtW72n6hylpvfAWjvnws6 85HhX24p7SLQB5MTCbU+MfT/vMUvQmmspec/RAbSQE5RqKPFm/IFf30Tcx9Ya+mV q0oRqLSIPDPvuHchkzKcHVUxNDY28j3m+lopaPddxf5s6DQwGfmlb8zayIrvVI8E TYX8Fc4dYFu1xLpsSZQKGenifqSb71nRRMdpq7/Qdm0Gk3tRYiVZAMHXo4AOAeuj DcL/OjyEooN2eaIIuQMBm9nuZYasiMeLoaQsaJjvXDxcMT/dSHf9y5+xC4F8j8bk RzujpK1CiHU6LQ/XftXnj6YY2Oc1OBe8ge9vprgjUQzYqZAmcXRRhW6brnAyosew Pvz0T3CTuP+3ik+AVURF84Ci1nQ5zkp7kxMwj6b6WiA8k8ZIVmR5sb3Nfa0wpWUU udrBh2vhBcCfMHFytZBacDTP1PI0UEwVn1EiATY/CTvyuJtf3LkkGnfRCYy2cFP8 df1PO0H7j8Xx5YnP25nbxCzmRRiaywpuSDJYv321v3psccXCP7PCDNTxR9m3z1yl xzCe/JWD1icAGEHCdTxgAzIHjqY+C+cuwQ/9CjGW/9bkYu2h/Adti9F5Yc0lk+gF Lp/13QYs0UgvQuH79OXzHmy5dijPp/mJBrUnmmT9rP9nam/H4sc= =03ZD -----END PGP SIGNATURE----- --nextPart1961688.ES8HNk12Op--