From: Masami Hiramatsu <mhiramat@kernel.org>
To: Holger Freyther <automatic+kernel@freyther.de>
Cc: linux-kernel@vger.kernel.org,
Holger Hans Peter Freyther <holgar+kernel@google.com>
Subject: Re: [RFC 0/6] perf probe: Attempt to improve C++ probing
Date: Mon, 14 May 2018 22:08:44 +0900 [thread overview]
Message-ID: <20180514220844.9ba3da2ab9a675f634f22349@kernel.org> (raw)
In-Reply-To: <20180514041940.96126-1-automatic+kernel@freyther.de>
Hi Holger,
Thank you for your great work!
On Mon, 14 May 2018 12:19:34 +0800
Holger Freyther <automatic+kernel@freyther.de> wrote:
> From: Holger Hans Peter Freyther <holgar+kernel@google.com>
>
> Currently perf probe -x app --funcs will list and demangle C++ functions
> but the other probe actions can't work with them. When asking probe to not
> demangle it will not list any of the application symbols creating the
> impression that there are no symbols at all.
>
> Make --funcs --no-demangle list all C++ functions and modify the handling
> for listing code, variables and adding the uprobe work with the demangled
> C++ function name.
>
> I tried to keep this as minimal as possible but having to keep the dso in
> the debuginfo and passing it everywhere to be able to demangle the linkage
> name isn't pretty (and for C++ demangling the struct dso is not of much
> use. Maybe having a static "empty" dso could avoid a lot of the changes).
>
> Maybe the easiest first patch is to default to --no-demangle and change
> the DEFAULT_FUNC_FILTER to not include mangled C++ symbols. The remaining
> tooling would work then.
>
> This has seen very little testing outside the following commands.
>
> My test set includes:
>
> ./perf probe -x . -L "std::vector<int, std::allocator<int> >::at"
> ./perf probe -x . -L "std::vector<int, std::allocator<int> >::at:2-3"
>
> ./perf probe -x . -V "std::vector<int, std::allocator<int> >::at"
> ./perf probe -x . -V "std::vector<int, std::allocator<int> >::at:2"
> ./perf probe -x . -V "std::vector<int, std::allocator<int> >::size%return"
OK, let me review it.
>
>
> Holger Hans Peter Freyther (6):
> perf probe: Do not exclude mangled C++ funcs
> perf probe: Parse linerange for C++ functions
> perf probe: Make listing of C++ functions work
> perf probe: Show variables for C++ functions
> perf probe: Make listing of variables work for C++ functions
> perf probe: Make it possible to add a C++ uprobe
>
> tools/perf/builtin-probe.c | 2 +-
> tools/perf/util/probe-event.c | 77 ++++++++++++++++++++-
> tools/perf/util/probe-finder.c | 152 ++++++++++++++++++++++++++++++-----------
> tools/perf/util/probe-finder.h | 3 +
> tools/perf/util/string.c | 57 ++++++++++++++++
> tools/perf/util/string2.h | 1 +
> 6 files changed, 247 insertions(+), 45 deletions(-)
>
> --
> 2.7.4
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2018-05-14 13:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 4:19 Holger Freyther
2018-05-14 4:19 ` [RFC 1/6] perf probe: Do not exclude mangled C++ funcs Holger Freyther
2018-05-14 4:19 ` [RFC 2/6] perf probe: Parse linerange for C++ functions Holger Freyther
2018-05-14 4:19 ` [RFC 3/6] perf probe: Make listing of C++ functions work Holger Freyther
2018-05-14 4:19 ` [RFC 4/6] perf probe: Show variables for C++ functions Holger Freyther
2018-05-14 4:19 ` [RFC 5/6] perf probe: Make listing of variables work " Holger Freyther
2018-05-14 4:19 ` [RFC 6/6] perf probe: Make it possible to add a C++ uprobe Holger Freyther
2018-05-14 13:08 ` Masami Hiramatsu [this message]
2018-05-14 13:31 ` [RFC 0/6] perf probe: Attempt to improve C++ probing Masami Hiramatsu
2018-05-15 14:10 ` Arnaldo Carvalho de Melo
[not found] <20180513110617.91669-1-automatic+kernel@freyther.de>
2018-05-14 16:11 ` Arnaldo Carvalho de Melo
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=20180514220844.9ba3da2ab9a675f634f22349@kernel.org \
--to=mhiramat@kernel.org \
--cc=automatic+kernel@freyther.de \
--cc=holgar+kernel@google.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome