mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: profile_pc() bogus since <= 2.6.19 (x86 at least)?
Date: Wed, 05 Mar 2008 15:51:42 +0000	[thread overview]
Message-ID: <47CECF9E.76E4.0078.0@novell.com> (raw)
In-Reply-To: <20080305153711.GC19300@elte.hu>

>>> Ingo Molnar <mingo@elte.hu> 05.03.08 16:37 >>>
>
>* Jan Beulich <jbeulich@novell.com> wrote:
>
>> 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...
>
>yeah - i guess it's not really relevant anymore now that lockdep saves 
>full stack traces. I doubt anyone bothers to look at wchan anymore. We 
>might even remove all the __lock and __sched sections and annotations?

Since drivers/oprofile/cpu_buffer.c and kernel/profile.c both have a
reference to profile_pc(), I'm not so sure about that. Perhaps if a
replacement for these two can be found...

Jan


      reply	other threads:[~2008-03-05 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05 11:14 Jan Beulich
2008-03-05 15:37 ` Ingo Molnar
2008-03-05 15:51   ` Jan Beulich [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=47CECF9E.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome