mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: acme@redhat.com
Cc: linux-kernel@vger.kernel.org, acme@kernel.org
Subject: Re: perf's handling of unfindable user symbols...
Date: Mon, 15 Oct 2018 16:02:46 -0700 (PDT)	[thread overview]
Message-ID: <20181015.160246.58484704665215987.davem@davemloft.net> (raw)
In-Reply-To: <20181015222546.GA2159@redhat.com>

From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Mon, 15 Oct 2018 19:25:46 -0300

> But I think we should have it as a property of 'struct machine', because we may
> be processing on, say, x86, a perf.data file recorded on a Sparc machine, so we
> need to save this property on the perf.data file, humm, or we can derive that
> from data already there, like the quick patch below. I'll cache that property
> on machine->user_kernel_shared_address_space, to avoid having to do the
> strcmp() lots of times.
> 
> Does that document the hack further? Defining the
> machine__user_kernel_shared_address_space() function right besides the
> machine__kernel_ip() inline should help as well?

Your patch looks fine.

But, more deeply, the VDSO thing itself makes no sense to me.

Why would we use the kernel map for something that is mapped into
userspace and uses the user space virtual addresse range?

As it is used by user applications, the VDSO isn't mapped into the
kernel virtual address range, therefore no PC from userspace executing
the VDSO will have a kernel range address.

We will see normal userspace virtual addresses instead.  Test this
assertion, if you like :-)

So I am suggesting that we remove the hack, and don't try to use the
kernel map for resolving the IP of user mode events.  If that is a
valid change, we can toss all of this weird stuff that tries to
interpret an address based upon what "range" it falls into.


  reply	other threads:[~2018-10-15 23:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14  7:42 David Miller
2018-10-15 22:25 ` Arnaldo Carvalho de Melo
2018-10-15 23:02   ` David Miller [this message]
2018-10-16 18:45     ` Arnaldo Carvalho de Melo
2018-10-16 19:02       ` David Miller
2018-10-16 19:37         ` Arnaldo Carvalho de Melo
2018-10-17  8:22       ` Masami Hiramatsu
2018-10-17 12:28         ` Arnaldo Carvalho de Melo
2018-10-18  9:35           ` Masami Hiramatsu
2018-10-18  9:42           ` Masami Hiramatsu

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=20181015.160246.58484704665215987.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®