All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steinar H. Gunderson" <sesse@google.com>
To: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	acme@kernel.org, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf report: Support LLVM for addr2line()
Date: Sat, 18 May 2024 18:52:04 +0200	[thread overview]
Message-ID: <ZkjctIdmFZGrqj5B@google.com> (raw)
In-Reply-To: <CAP-5=fVYvT5EmPDu8gYUPSB+GjHF=K0dvTq2wwwHKOg58LStcw@mail.gmail.com>

On Fri, May 17, 2024 at 02:27:43PM -0700, Ian Rogers wrote:
> This is great! There has been talk about the code being slow and I
> think libelf may have been another alternative for this (maybe also
> capstone). We should probably build a `perf bench` for this given the
> variety of choice.

I'm not sure if capstone can do this, but I don't know it very well.
libelf probably can, but LLVM has a nice advantage in that it also
supports, well, non-ELF.

I took the time to write an LLVM-based disassembler, too; it took some
coaxing (there's basically a C and a C++ API that are very different,
where the C API is much easier to set up but has some limitations),
but I think it ended up not too bad at all. I'm tacking it on to the
next patch series. I think after this, the only things really requiring
BUILD_NONDISTRO=1 would be non-ELF debuglink support, slightly different
demangling, and loading of PE symbols?

> nit: kernel style is no curly braces for a single line. If there are
> curlies for the if or the else then curlies should be on both sides.
> ./scripts/checkpatch.pl should be able to catch things like this, but
> it may ignore C++ files.

Ack. (I did run checkpatch, but as you guessed, it didn't complain.)

/* Steinar */

      reply	other threads:[~2024-05-18 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-17 18:54 [PATCH] perf report: Support LLVM for addr2line() Steinar H. Gunderson
2024-05-17 21:27 ` Ian Rogers
2024-05-18 16:52   ` Steinar H. Gunderson [this message]

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=ZkjctIdmFZGrqj5B@google.com \
    --to=sesse@google.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.