linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: Stefani Seibold <stefani@seibold.net>
Cc: Mikael Pettersson <mikpe@it.uu.se>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Joerg Engel <joern@logfs.org>
Subject: Re: Detailed Stack Information Patch [2/3]
Date: Fri, 3 Apr 2009 10:54:06 +0200	[thread overview]
Message-ID: <18901.52910.795773.284166@pilspetsen.it.uu.se> (raw)
In-Reply-To: <1238745668.8735.4.camel@matrix>

Stefani Seibold writes:
 > Am Freitag, den 03.04.2009, 09:32 +0200 schrieb Mikael Pettersson:
 > > Stefani Seibold writes:
 > >  > I think a user space daemon will be the a good way if the /proc/*/maps
 > >  > or /proc/*/stack will provide the following information:
 > >  > 
 > >  > - start address of the stack
 > >  > - current address of the stack pointer
 > >  > - highest used address in the stack
 > > 
 > > You're assuming
 > > 1. a thread has exactly one stack
 > > 2. the stack is a single unbroken area
 > > 3. the kernel knows the location of this area
 > > 
 > > None of these assumptions are necessarily valid, esp. in
 > > the presence of virtualizers, managed runtimes, or mixed
 > > interpreted/JIT language implementations.
 > 
 > We are talking about the kernel view. And from this point a thread has
 > only one stack and it is a single mapped continuous area. There are only
 > one exception and that is the sigaltstack().

So you're proposing to have the kernel export data which,
while accurate from the kernel's limited view, may be
arbitrarily inaccurate for the user-space process in question?

Also I'm not sure you even need a kernel extension for the
optimistic case of a single simple stack. ptrace to get stack
pointer then scan /proc/$tid/maps to identify the corresponding
mapping should give the same information, no?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2009-04-03  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 14:58 Stefani Seibold
2009-04-01 19:36 ` Ingo Molnar
2009-04-02 21:25   ` Stefani Seibold
2009-04-03  7:32     ` Mikael Pettersson
2009-04-03  8:01       ` Stefani Seibold
2009-04-03  8:54         ` Mikael Pettersson [this message]

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=18901.52910.795773.284166@pilspetsen.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=stefani@seibold.net \
    /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