linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 2/2] perf: Drop the skip argument from perf_arch_fetch_regs_caller
Date: Fri, 21 May 2010 12:29:30 +0200	[thread overview]
Message-ID: <20100521102928.GF30108@nowhere> (raw)
In-Reply-To: <1274437477.1674.1698.camel@laptop>

On Fri, May 21, 2010 at 12:24:37PM +0200, Peter Zijlstra wrote:
> On Fri, 2010-05-21 at 10:11 +0200, Frederic Weisbecker wrote:
> > +static inline void perf_fetch_caller_regs(struct pt_regs *regs)
> >  {
> > -       unsigned long ip;
> > -
> >         memset(regs, 0, sizeof(*regs));
> 
> btw, do we really need that memset?
> 
> As long as we don't actually copy out to userspace, it really doesn't
> matter what is in there, and we should be setting all relevant registers
> anyway.


We probably need to decouple that yeah.

- If we don't do callchains, we don't need to deref bp
- If we don't copy to userspace, we don't need to zeroe

We should do the filling much later for tracepoints in fact,
but that doesn't concern syscalls or kprobes.

But well, I'll iterate that step by step.


  reply	other threads:[~2010-05-21 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  8:11 [PATCH 0/2] perf: perf_arch_fetch_regs_caller API change Frederic Weisbecker
2010-05-21  8:11 ` [PATCH 1/2] x86: Unify dumpstack.h and stacktrace.h Frederic Weisbecker
2010-05-21  8:11 ` [PATCH 2/2] perf: Drop the skip argument from perf_arch_fetch_regs_caller Frederic Weisbecker
2010-05-21 10:24   ` Peter Zijlstra
2010-05-21 10:29     ` Frederic Weisbecker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-25 13:45 [GIT PULL] perf updates Frederic Weisbecker
2010-05-25 13:45 ` [PATCH 2/2] perf: Drop the skip argument from perf_arch_fetch_regs_caller Frederic Weisbecker

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=20100521102928.GF30108@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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).