From: Milian Wolff <milian.wolff@kdab.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org,
Jin Yao <yao.jin@linux.intel.com>,
Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
David Ahern <dsahern@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH v3 03/13] perf report: create real callchain entries for inlined frames
Date: Sun, 01 Oct 2017 14:40:37 +0200 [thread overview]
Message-ID: <3335153.DEsh8gBIbp@agathebauer> (raw)
In-Reply-To: <20170919122727.GC13388@krava>
On Dienstag, 19. September 2017 14:27:27 CEST Jiri Olsa wrote:
> On Wed, Sep 06, 2017 at 03:54:51PM +0200, Milian Wolff wrote:
> > The inlined frames use a fake symbol that is maintained by
> > inline_node which in turn is maintained by the dso->inlines tree.
> > This tree is always sorted by name. All other entries of the symbol
> > beside the function name are unused for inline frames. The advantage
> > of this approach is that all existing users of the callchain API can
> > now transparently display inlined frames without having to patch
> > their code.
> >
> > 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/dso.c | 2 +
> > tools/perf/util/dso.h | 1 +
> > tools/perf/util/machine.c | 37 +++++++++
> > tools/perf/util/srcline.c | 186
> > ++++++++++++++++++++++++++++++++++++---------- tools/perf/util/srcline.h
> > | 19 ++++-
> > tools/perf/util/symbol.h | 1 +
> > 6 files changed, 203 insertions(+), 43 deletions(-)
> >
> > diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> > index b9e087fb8247..72e6e390fd26 100644
> > --- a/tools/perf/util/dso.c
> > +++ b/tools/perf/util/dso.c
> > @@ -9,6 +9,7 @@
> >
> > #include "compress.h"
> > #include "path.h"
> > #include "symbol.h"
> >
> > +#include "srcline.h"
> >
> > #include "dso.h"
> > #include "machine.h"
> > #include "auxtrace.h"
> >
> > @@ -1233,6 +1234,7 @@ void dso__delete(struct dso *dso)
> >
> > dso->long_name);
> >
> > for (i = 0; i < MAP__NR_TYPES; ++i)
> >
> > symbols__delete(&dso->symbols[i]);
> >
> > + inlines__tree_delete(&dso->inlined_nodes);
> >
> > if (dso->short_name_allocated) {
> >
> > zfree((char **)&dso->short_name);
> >
> > diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
> > index f886141678eb..7d1e2b3c1f10 100644
> > --- a/tools/perf/util/dso.h
> > +++ b/tools/perf/util/dso.h
> > @@ -141,6 +141,7 @@ struct dso {
> >
> > struct rb_root *root; /* root of rbtree that rb_node is in
*/
> > struct rb_root symbols[MAP__NR_TYPES];
> > struct rb_root symbol_names[MAP__NR_TYPES];
> >
> > + struct rb_root inlined_nodes;
>
> should you init this like below?
Probably, I don't know enough about the rb_root API. I've added the hunk below
now, thanks.
> ---
> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> index 53ceccdf74be..ed8cab3b51b1 100644
> --- a/tools/perf/util/dso.c
> +++ b/tools/perf/util/dso.c
> @@ -1202,6 +1202,7 @@ struct dso *dso__new(const char *name)
> for (i = 0; i < MAP__NR_TYPES; ++i)
> dso->symbols[i] = dso->symbol_names[i] = RB_ROOT;
> dso->data.cache = RB_ROOT;
> + dso->inlined_nodes = RB_ROOT;
> dso->data.fd = -1;
> dso->data.status = DSO_DATA_STATUS_UNKNOWN;
> dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND;
--
Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
next prev parent reply other threads:[~2017-10-01 12:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 13:54 [PATCH v3 00/13] generate full callchain cursor entries for inlined frames Milian Wolff
2017-09-06 13:54 ` [PATCH v3 01/13] perf report: remove code to handle inline frames from browsers Milian Wolff
2017-09-18 11:56 ` Jiri Olsa
2017-09-18 12:43 ` Milian Wolff
2017-09-06 13:54 ` [PATCH v3 02/13] perf util: store srcline in callchain_cursor_node Milian Wolff
2017-09-06 13:54 ` [PATCH v3 03/13] perf report: create real callchain entries for inlined frames Milian Wolff
2017-09-19 12:27 ` Jiri Olsa
2017-10-01 12:37 ` Milian Wolff
2017-10-01 17:40 ` Joe Perches
2017-09-19 12:27 ` Jiri Olsa
2017-10-01 14:12 ` Milian Wolff
2017-09-19 12:27 ` Jiri Olsa
2017-10-01 12:40 ` Milian Wolff [this message]
2017-09-06 13:54 ` [PATCH v3 04/13] perf report: fall-back to function name comparison for -g srcline Milian Wolff
2017-09-06 13:54 ` [PATCH v3 05/13] perf report: mark inlined frames in output by " (inlined)" suffix Milian Wolff
2017-09-06 13:54 ` [PATCH v3 06/13] perf script: mark inlined frames and do not print DSO for them Milian Wolff
2017-09-06 13:54 ` [PATCH v3 07/13] perf report: compare symbol name for inlined frames when matching Milian Wolff
2017-09-06 13:54 ` [PATCH v3 08/13] perf report: compare symbol name for inlined frames when sorting Milian Wolff
2017-09-06 13:54 ` [PATCH v3 09/13] perf report: properly handle branch count in match_chain Milian Wolff
2017-09-06 13:54 ` [PATCH v3 10/13] perf report: cache failed lookups of inlined frames Milian Wolff
2017-09-06 13:54 ` [PATCH v3 11/13] perf report: cache srclines for callchain nodes Milian Wolff
2017-09-06 13:55 ` [PATCH v3 12/13] perf report: use srcline from callchain for hist entries Milian Wolff
2017-09-06 13:55 ` [PATCH v3 13/13] perf util: enable handling of inlined frames by default Milian Wolff
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=3335153.DEsh8gBIbp@agathebauer \
--to=milian.wolff@kdab.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=yao.jin@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.