public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Milian Wolff <mail@milianw.de>
To: elfutils-devel@sourceware.org, Serhei Makarov <serhei@serhei.io>
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	[thread overview]
Message-ID: <3375729.uvHT6U3Wrp@milian-workstation> (raw)
In-Reply-To: <592158b9-d920-455d-8b2d-b4419c622929@app.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 3162 bytes --]

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.

<snip>

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2023-05-09 18:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 12:33 Serhei Makarov
2023-05-08 21:50 ` Christian Hergert
2023-05-11 19:27   ` Serhei Makarov
2023-05-15 17:55     ` Christian Hergert
2023-05-09 18:02 ` Milian Wolff [this message]
2023-05-11 19:31   ` Serhei Makarov
2024-07-03 14:21 ` eu-stacktrace: roadmap update Serhei Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3375729.uvHT6U3Wrp@milian-workstation \
    --to=mail@milianw.de \
    --cc=chergert@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@elastic.org \
    --cc=mark@klomp.org \
    --cc=serhei@serhei.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).