linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: fweisbec@gmail.com
Cc: mingo@elte.hu, paulus@samba.org, linux-arch@vger.kernel.org
Subject: Re: perf_arch_fetch_caller_regs...
Date: Thu, 18 Mar 2010 21:47:04 -0700 (PDT)	[thread overview]
Message-ID: <20100318.214704.116395963.davem@davemloft.net> (raw)
In-Reply-To: <20100319042414.GA23574@nowhere>

From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Fri, 19 Mar 2010 05:24:16 +0100

> On Thu, Mar 18, 2010 at 09:02:41PM -0700, David Miller wrote:
>> 
>> Can we please remove the CALLER_ADDR0 et al. evaluations at the top
>> level in perf_fetch_caller_regs()?
>> 
>> I take great pains to avoid having to flush the register windows on
>> sparc64 even when fetching callchains et al and any
>> __builtin_return_address() with an argument greater than zero is going
>> to force a register window flush to get emitted by gcc undoing all of
>> my hard work :-)
> 
> 
> Ah. But does that really cause bad things? I mean you don't need
> to save all the ix/ox/lx registers, only the instruction pointer,
> frame pointer, flags, and something that can help user_mode() to
> return 0.
> 
> I don't know deeply this area, but the frame pointer is
> part of the window in the ix things, right? And the CALLER
> thing screws up the frame pointer and makes it hard to rewind
> precisely?

It causes bad things, as in performance is rediculiously bad if
GCC emits that register window flush.  That's the whole point of
my mail, it undoes all of the hard work I do to avoid the register
window flushes.

I fix the performance problems by doing it by hand, walking up the
unflushed register windows and storing only the frame pointer and
return PC into the stack frame.

> Yeah, ok if this is that a burden/useless for archs then I'm going to
> remove it.

Thanks.

  reply	other threads:[~2010-03-19  4:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  4:02 perf_arch_fetch_caller_regs David Miller
2010-03-19  4:24 ` perf_arch_fetch_caller_regs Frederic Weisbecker
2010-03-19  4:47   ` David Miller [this message]
2010-03-19  4:32 ` perf_arch_fetch_caller_regs Paul Mackerras
2010-03-19  4:51   ` perf_arch_fetch_caller_regs David Miller

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=20100318.214704.116395963.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=fweisbec@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).