linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	Tom Zanussi <tzanussi@gmail.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Robert Richter <robert.richter@amd.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [RFC PATCH 2/9] perf: Add ability to dump user regs
Date: Wed, 20 Oct 2010 18:13:52 +0200	[thread overview]
Message-ID: <20101020161349.GE5387@nowhere> (raw)
In-Reply-To: <AANLkTinteS8FFNZQ6ZadB4WMZUUKYeTYfatggBNdF1xA@mail.gmail.com>

On Wed, Oct 20, 2010 at 11:24:42AM +0200, Stephane Eranian wrote:
> On Tue, Oct 19, 2010 at 12:35 AM, Frederic Weisbecker
> <fweisbec@gmail.com> wrote:
> > On Mon, Oct 18, 2010 at 12:01:18PM +0200, Stephane Eranian wrote:
> >> On Sun, Oct 17, 2010 at 12:07 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> >> > On Sat, 2010-10-16 at 00:58 +0200, Frederic Weisbecker wrote:
> >> >> > Yes, PEBS does not capture the entire state.
> >> >> >
> >> >> > Here is what you get on Intel Core:
> >> >> >         u64 flags, ip;
> >> >> >         u64 ax, bx, cx, dx;
> >> >> >         u64 si, di, bp, sp;
> >> >> >         u64 r8,  r9,  r10, r11;
> >> >> >         u64 r12, r13, r14, r15;
> >> >
> >> >> Ok, that seems to cover most of the state. I guess few people care
> >> >> about cs, ds, es, fs, gs, most of the time.
> >> >
> >> > Yeah, except if you want to profile wine or something like that ;-)
> >> >
> >> That means that if you want the segment registers, then you cannot
> >> use PEBS. I think you could catch that when the event is created.
> >>
> >> The other problem here is how to name registers at the API level.
> >> You would be introducing architecture-specific register names
> >> in perf_event.h. There is no such a thing today.
> >
> >
> > That can go into an asm/perf_regs.h or something. It's up to the
> > arch to name its registers.
> >
> I am fine with that.
> 
> Starting with Nehalem,  there is a PEBS mode where HW captures
> not just actual register state but also information about cache misses
> such as the data address, miss latency, data source. Those are
> stored in the PEBS record as u64. I believe we could also expose
> this thru this register bitmask mechanism. Of course, you'd get a
> failure if PEBS is not programmed correctly.



I'm not sure the registers are the right place for that. This is
too oriented toward a specific mechanism.

I would rather put that into a PERF_SAMPLE_RAW dump or a specific pebs
sample.

The problem with PERF_SAMPLE_RAW is that perf tools always think
it's trace event content. It should look at what event it is
looking at before making that assumption.

We'd need to look at the event that triggered the sample to
interpret the sample raw. That's fixable.



> The alternative would be to invent yet another generic abstraction
> to sample cache misses. Note that PEBS cache miss sampling
> cannot be attached to an existing generic cache miss event. It
> uses a dedicated event which does not count all cache misses.

Then perhaps that should be abstracted into a different event yeah.


  reply	other threads:[~2010-10-20 16:13 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  5:06 [RFC] perf: Dwarf cfi based user callchains Frederic Weisbecker
2010-10-13  5:06 ` [RFC PATCH 1/9] uaccess: Make copy_from_user_nmi() globally available Frederic Weisbecker
2010-10-13  7:15   ` Peter Zijlstra
2010-10-13 14:47     ` Frederic Weisbecker
2010-10-13 20:43       ` Peter Zijlstra
2010-10-13  5:06 ` [RFC PATCH 2/9] perf: Add ability to dump user regs Frederic Weisbecker
2010-10-13  7:20   ` Peter Zijlstra
2010-10-13 14:56     ` Frederic Weisbecker
2010-10-13 14:58     ` Frederic Weisbecker
2010-10-14 11:06     ` Stephane Eranian
2010-10-14 11:20       ` Frederic Weisbecker
2010-10-15  8:39         ` Stephane Eranian
2010-10-15 22:58           ` Frederic Weisbecker
2010-10-17 10:07             ` Peter Zijlstra
2010-10-18 10:01               ` Stephane Eranian
2010-10-18 22:35                 ` Frederic Weisbecker
2010-10-20  9:24                   ` Stephane Eranian
2010-10-20 16:13                     ` Frederic Weisbecker [this message]
2010-10-20 16:19                     ` Peter Zijlstra
2010-10-13  5:06 ` [RFC PATCH 3/9] perf: Add ability to dump part of the user stack Frederic Weisbecker
2010-10-13  7:22   ` Peter Zijlstra
2010-10-13 15:01     ` Frederic Weisbecker
2010-10-13  5:06 ` [RFC PATCH 4/9] perf: Don't record frame pointer based user stacktraces if we dump stack and regs Frederic Weisbecker
2010-10-13  7:23   ` Peter Zijlstra
2010-10-13 15:02     ` Frederic Weisbecker
2010-10-16  0:19     ` Frederic Weisbecker
2010-10-13  5:06 ` [RFC PATCH 5/9] perf: Support for dwarf mode callchain on perf record Frederic Weisbecker
2010-10-13  5:06 ` [RFC PATCH 6/9] perf: Build with dwarf cfi Frederic Weisbecker
2010-10-13  5:06 ` [RFC PATCH 7/9] perf: Support for error passed over pointers Frederic Weisbecker
2010-10-13  5:07 ` [RFC PATCH 8/9] perf: Add libunwind dependency for dwarf cfi unwinding Frederic Weisbecker
2010-10-13  5:07 ` [RFC PATCH 9/9] perf: Support for dwarf cfi unwinding on post processing Frederic Weisbecker
2010-10-13 15:13 ` [RFC] perf: Dwarf cfi based user callchains Frank Ch. Eigler
2010-10-20 15:35   ` 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=20101020161349.GE5387@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eranian@google.com \
    --cc=gorcunov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=rostedt@goodmis.org \
    --cc=tzanussi@gmail.com \
    /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).