All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milian Wolff <milian.wolff@kdab.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Ahern <dsahern@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Yao Jin <yao.jin@linux.intel.com>,
	kernel-team@lge.com
Subject: Re: [PATCH v2] perf report: distinguish between inliners in the same function
Date: Thu, 18 May 2017 14:20:10 +0200	[thread overview]
Message-ID: <1807904.FlA7po8Zpv@agathebauer> (raw)
In-Reply-To: <20170517061316.GE32691@danjae.aot.lge.com>

[-- Attachment #1: Type: text/plain, Size: 2950 bytes --]

On Mittwoch, 17. Mai 2017 08:13:16 CEST Namhyung Kim wrote:
> On Tue, May 16, 2017 at 03:18:13PM +0200, Milian Wolff wrote:
> > On Dienstag, 16. Mai 2017 02:53:32 CEST Namhyung Kim wrote:
> > > On Mon, May 15, 2017 at 12:01:54PM +0200, Milian Wolff wrote:
> > > > On Monday, May 15, 2017 3:21:58 AM CEST Namhyung Kim wrote:
> > > > > Hi Milian,
> > > > > 
> > > > > On Sun, May 14, 2017 at 08:10:50PM +0200, Milian Wolff wrote:
> > > > > > On Freitag, 12. Mai 2017 15:01:29 CEST Namhyung Kim wrote:
> > > > > I think you'd be better adding (fake) dso and sym to keep the inline
> > > > > information.  The fake dso can be paired with the original dso and
> > > > > maintain a tree of (inlined) symbols.  You may need a fake map to
> > > > > point the fake dso then.  It seems a bit compilcated but that way
> > > > > the
> > > > > code will be more consistent and easier to handle (e.g. for caching
> > > > > and/or deletion) IMHO.
> > > > 
> > > > Can you expand on this please? How would that solve the problem of
> > > > finding
> > > > a function name or srcline for a given inline frame?
> > > > 
> > > > I.e.: the function name is, currently, part of the sym. So the fake
> > > > dso/map
> > > > would contain an internal, fake, string table which fake symbols could
> > > > leverage for the function name?
> > > > 
> > > > Sounds like doable, but also sounds like *a lot* of work. And I don't
> > > > see
> > > > how that would solve the srcline situation: That one is queried
> > > > on-demand
> > > > based on the IP of a frame. I would say that inline frames should keep
> > > > the IP of the first non-inlined frame. But that would make it
> > > > impossible
> > > > to find the srcline for the N'th inlined frame... Am I missing
> > > > something?
> > > 
> > > I agree that srcline info can be kept in callchain cursor nodes, but I
> > > still think function name should be in (fake) symbols.  Sharing a
> > > symbol for all inlined frames would not work for the children mode
> > > IMHO.
> > 
> > I'm running into a bit of trouble here. I hoped to be able to store the
> > inlined symbol in the DSO to reuse it for other inlined entries that use
> > the same function. I also hope that this will then take care of the
> > deletion of the fake symbols, once the dso is freed.
> 
> I don't want to store inlined functions to an original DSO as it would
> confuse symbol lookups in the DSO.  As you said those inlined
> functions will have same address so multiple symbols exist for an
> address.
> 
> I thought they can be kept in a fake DSO which should be linked to the
> original DSO, but it doesn't need to be a DSO.  Instead a DSO can have
> a tree that maintains lists of (inlined) symbols and srclines sorted
> by address.

Thank you, this is what I'll be doing now.

Cheers

-- 
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

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]

  reply	other threads:[~2017-05-18 12:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 21:35 [PATCH v2] perf report: distinguish between inliners in the same function Milian Wolff
2017-05-08  8:45 ` Milian Wolff
2017-05-08 16:17   ` Arnaldo Carvalho de Melo
2017-05-10  5:53 ` Namhyung Kim
2017-05-12 10:37   ` Milian Wolff
2017-05-12 13:01     ` Namhyung Kim
2017-05-14 18:10       ` Milian Wolff
2017-05-14 18:10         ` Milian Wolff
2017-05-15  1:21         ` Namhyung Kim
2017-05-15 10:01           ` Milian Wolff
2017-05-16  0:53             ` Namhyung Kim
2017-05-16 13:18               ` Milian Wolff
2017-05-17  6:13                 ` Namhyung Kim
2017-05-18 12:20                   ` Milian Wolff [this message]
2017-05-12 14:55     ` Andi Kleen
2017-05-15  0:44       ` Namhyung Kim

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=1807904.FlA7po8Zpv@agathebauer \
    --to=milian.wolff@kdab.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --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.