Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1644856 > unrolled thread
| Started by | Milian Wolff <milian.wolff@kdab.com> |
|---|---|
| First post | 2017-05-18 21:40 +0200 |
| Last post | 2017-05-24 13:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix Milian Wolff <milian.wolff@kdab.com> - 2017-05-18 21:40 +0200
Re: [PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix Namhyung Kim <namhyung@kernel.org> - 2017-05-22 14:50 +0200
Re: [PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix Milian Wolff <milian.wolff@kdab.com> - 2017-05-24 13:50 +0200
| From | Milian Wolff <milian.wolff@kdab.com> |
|---|---|
| Date | 2017-05-18 21:40 +0200 |
| Subject | [PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix |
| Message-ID | <tIzrb-7No-7@gated-at.bofh.it> |
The original patch that introduced inline frame output in the
various browsers used this suffix already. The new centralized
approach that uses fake symbols for inlined frames was missing
this approach so far.
Instead of changing the symbol name itself, we only print the
suffix where needed. This allows us to efficiently lookup
the symbol for a given name without first having to append the
suffix before the lookup.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yao Jin <yao.jin@linux.intel.com>
Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
---
tools/perf/util/callchain.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 211ed3713fac..4350c7ceaca1 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1061,11 +1061,15 @@ char *callchain_list__sym_name(struct callchain_list *cl,
int printed;
if (cl->ms.sym) {
+ const char *inlined = cl->ms.sym->inlined ? " (inlined)" : "";
+
if (show_srcline && cl->srcline)
- printed = scnprintf(bf, bfsize, "%s %s",
- cl->ms.sym->name, cl->srcline);
+ printed = scnprintf(bf, bfsize, "%s %s%s",
+ cl->ms.sym->name, cl->srcline,
+ inlined);
else
- printed = scnprintf(bf, bfsize, "%s", cl->ms.sym->name);
+ printed = scnprintf(bf, bfsize, "%s%s",
+ cl->ms.sym->name, inlined);
} else
printed = scnprintf(bf, bfsize, "%#" PRIx64, cl->ip);
--
2.13.0
[toc] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2017-05-22 14:50 +0200 |
| Subject | Re: [PATCH 6/7] perf report: mark inlined frames in output by " (inlined)" suffix |
| Message-ID | <tJUWC-5LA-1@gated-at.bofh.it> |
| In reply to | #1644856 |
On Thu, May 18, 2017 at 09:34:10PM +0200, Milian Wolff wrote:
> The original patch that introduced inline frame output in the
> various browsers used this suffix already. The new centralized
> approach that uses fake symbols for inlined frames was missing
> this approach so far.
>
> Instead of changing the symbol name itself, we only print the
> suffix where needed. This allows us to efficiently lookup
> the symbol for a given name without first having to append the
> suffix before the lookup.
You also need to do same thing for hist_entry__sym_snprintf().
Thanks,
Namhyung
>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Yao Jin <yao.jin@linux.intel.com>
> Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
> ---
> tools/perf/util/callchain.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
> index 211ed3713fac..4350c7ceaca1 100644
> --- a/tools/perf/util/callchain.c
> +++ b/tools/perf/util/callchain.c
> @@ -1061,11 +1061,15 @@ char *callchain_list__sym_name(struct callchain_list *cl,
> int printed;
>
> if (cl->ms.sym) {
> + const char *inlined = cl->ms.sym->inlined ? " (inlined)" : "";
> +
> if (show_srcline && cl->srcline)
> - printed = scnprintf(bf, bfsize, "%s %s",
> - cl->ms.sym->name, cl->srcline);
> + printed = scnprintf(bf, bfsize, "%s %s%s",
> + cl->ms.sym->name, cl->srcline,
> + inlined);
> else
> - printed = scnprintf(bf, bfsize, "%s", cl->ms.sym->name);
> + printed = scnprintf(bf, bfsize, "%s%s",
> + cl->ms.sym->name, inlined);
> } else
> printed = scnprintf(bf, bfsize, "%#" PRIx64, cl->ip);
>
> --
> 2.13.0
>
[toc] | [prev] | [next] | [standalone]
| From | Milian Wolff <milian.wolff@kdab.com> |
|---|---|
| Date | 2017-05-24 13:50 +0200 |
| Message-ID | <tKCXF-1Q9-21@gated-at.bofh.it> |
| In reply to | #1646842 |
[Multipart message — attachments visible in raw view] — view raw
On Monday, May 22, 2017 2:48:18 PM CEST Namhyung Kim wrote: > On Thu, May 18, 2017 at 09:34:10PM +0200, Milian Wolff wrote: > > The original patch that introduced inline frame output in the > > various browsers used this suffix already. The new centralized > > approach that uses fake symbols for inlined frames was missing > > this approach so far. > > > > Instead of changing the symbol name itself, we only print the > > suffix where needed. This allows us to efficiently lookup > > the symbol for a given name without first having to append the > > suffix before the lookup. > > You also need to do same thing for hist_entry__sym_snprintf(). Thank you, will do! -- Milian Wolff | milian.wolff@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web