All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: <linux-kernel@vger.kernel.org>
Subject: profile_pc() bogus since <= 2.6.19 (x86 at least)?
Date: Wed, 05 Mar 2008 11:14:37 +0000	[thread overview]
Message-ID: <47CE8EAD.76E4.0078.0@novell.com> (raw)

Ingo,

while the comment at the top of kernel/spinlock.c states so:

 * Note that some architectures have special knowledge about the
 * stack frames of these functions in their profile_pc. If you
 * change anything significant here that could change the stack
 * frame contact the architecture maintainers.

the actual code doesn't seem to match this anymore. With all (and
even before that, many) functions being written in C, there cannot
be validly made assumptions about the stack frame layout. Indeed,
if I check the disassembly framed by __lock_text_{start,end} on
x86, there are a number of functions that push one or two registers
(in lock_kernel() even stack variables are being allocated), which
clearly breaks profile_pc()'s assumptions.

Since it's been this way for so long, I wonder how frequently this
code is actually being exercised...

Jan


             reply	other threads:[~2008-03-05 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05 11:14 Jan Beulich [this message]
2008-03-05 15:37 ` profile_pc() bogus since <= 2.6.19 (x86 at least)? Ingo Molnar
2008-03-05 15:51   ` Jan Beulich

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=47CE8EAD.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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.