Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704988
| From | Milian Wolff <milian.wolff@kdab.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 05/14] perf report: mark inlined frames in output by " (inlined)" suffix |
| Date | 2017-08-06 23:30 +0200 |
| Message-ID | <ubBhx-7tc-39@gated-at.bofh.it> (permalink) |
| References | <ubBhw-7tc-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 +++++++---
tools/perf/util/sort.c | 3 +++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 6afa8ccd75b5..5e099fe0b9dc 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -1100,11 +1100,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);
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 12359bd986db..66fa841717fb 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -283,6 +283,9 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
ret += repsep_snprintf(bf + ret, size - ret, "%.*s",
width - ret,
sym->name);
+ if (sym->inlined)
+ ret += repsep_snprintf(bf + ret, size - ret,
+ " (inlined)");
}
} else {
size_t len = BITS_PER_LONG / 4;
--
2.13.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/14] generate full callchain cursor entries for inlined frames Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
[PATCH v2 12/14] perf report: use srcline from callchain for hist entries Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
[PATCH v2 07/14] perf report: compare symbol name for inlined frames when matching Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
[PATCH v2 05/14] perf report: mark inlined frames in output by " (inlined)" suffix Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
[PATCH v2 13/14] perf util: do not consider empty files as valid srclines Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
Re: [PATCH v2 13/14] perf util: do not consider empty files as valid srclines Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-07 17:30 +0200
[PATCH v2 03/14] perf report: create real callchain entries for inlined frames Milian Wolff <milian.wolff@kdab.com> - 2017-08-06 23:30 +0200
csiph-web