From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, jolsa@kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] perf, tools: Always use non inlined file name for srcfile
Date: Tue, 1 Sep 2015 15:36:57 -0300 [thread overview]
Message-ID: <20150901183657.GG29821@kernel.org> (raw)
In-Reply-To: <1441131102-28331-1-git-send-email-andi@firstfloor.org>
Em Tue, Sep 01, 2015 at 11:11:42AM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> When profiling the kernel with srcfile it's common to "get
> stuck" in include. For example a lot of code uses current
> or other inlines, so they get accounted to some random
> include file. This is not very useful as a high level
> categorization.
Cool idea :-)
> For example just profiling the idle loop usually shows
> mostly inlines, so you never see the actual cpuidle file.
> @@ -170,6 +171,15 @@ static int addr2line(const char *dso_name, u64 addr,
>
> bfd_map_over_sections(a2l->abfd, find_address_in_section, a2l);
>
> + if (a2l->found && unwind_inlines) {
> + bool found;
> +
> + do {
> + found = bfd_find_inliner_info(a2l->abfd, &a2l->filename,
> + &a2l->funcname, &a2l->line);
> + } while (found);
> + }
Why not the so much simpler:
while (bfd_find_inliner_info(...));
But other than that, wouldn't be better to put an upper limit on this?
Say, 1024 levels of unwinding to avoid tripping in some bfd lib bug that
could make this function always return true and make addr2line get stuck
in an infinite loop?
- Arnaldo
next prev parent reply other threads:[~2015-09-01 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 18:11 [PATCH] perf, tools: Always use non inlined file name for srcfile Andi Kleen
2015-09-01 18:36 ` Arnaldo Carvalho de Melo [this message]
2015-09-01 18:48 ` Andi Kleen
2015-09-01 19:21 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2015-09-01 18:47 Andi Kleen
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=20150901183657.GG29821@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--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