Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217017
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf, tools: Always use non inlined file name for srcfile |
| Date | 2015-09-01 20:40 +0200 |
| Message-ID | <q3YDo-6fB-5@gated-at.bofh.it> (permalink) |
| References | <q3Yk2-5Tw-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf, tools: Always use non inlined file name for srcfile Andi Kleen <andi@firstfloor.org> - 2015-09-01 20:20 +0200
Re: [PATCH] perf, tools: Always use non inlined file name for srcfile Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-01 20:40 +0200
Re: [PATCH] perf, tools: Always use non inlined file name for srcfile Andi Kleen <ak@linux.intel.com> - 2015-09-01 20:50 +0200
Re: [PATCH] perf, tools: Always use non inlined file name for srcfile Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-01 21:30 +0200
csiph-web