From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 13/15] perf_counter: provide generic callchain bits
Date: Wed, 01 Apr 2009 09:59:04 +0200 [thread overview]
Message-ID: <1238572744.8530.2541.camel@twins> (raw)
In-Reply-To: <18898.58399.957182.181124@drongo.ozlabs.ibm.com>
On Wed, 2009-04-01 at 14:48 +1100, Paul Mackerras wrote:
> Peter Zijlstra writes:
>
> > That still has the record and read things separate, but as one unified
> > overflow output.
>
> I take it PERF_EVENT_OVERFLOW refers to counter overflow, not ring
> buffer overflow? That had me confused for a bit, so more explicit
> naming, or at least some comments, would be good.
Ah, yes, I see how that can confuse. PERF_EVENT_COUNTER_OVERFLOW then?
I was thinking about doing splice() support and that could also generate
actual event overflow events ;-)
> > /*
> > + * Bits that can be set in hw_event.record_type to request information
> > + * in the overflow packets.
> > + */
> > +enum perf_counter_record_format {
> > + PERF_RECORD_IP = 1U << 0,
> > + PERF_RECORD_TID = 1U << 1,
> > + PERF_RECORD_GROUP = 1U << 2,
> > + PERF_RECORD_CALLCHAIN = 1U << 3,
> > +};
> [snip]
> > enum perf_event_type {
> >
> > - PERF_EVENT_GROUP = 1,
> > -
> > - PERF_EVENT_MMAP = 2,
> > - PERF_EVENT_MUNMAP = 3,
> > + PERF_EVENT_MMAP = 1,
> > + PERF_EVENT_MUNMAP = 2,
> >
> > PERF_EVENT_OVERFLOW = 1UL << 31,
> > __PERF_EVENT_IP = 1UL << 30,
> > __PERF_EVENT_TID = 1UL << 29,
> > - __PERF_EVENT_CALLCHAIN = 1UL << 28,
> > + __PERF_EVENT_GROUP = 1UL << 28,
> > + __PERF_EVENT_CALLCHAIN = 1UL << 27,
>
> Could we use the same value (and even the same name) for
> PERF_RECORD_IP/__PERF_EVENT_IP, PERF_RECORD_TID/__PERF_EVENT_TID,
> etc.?
I suppose we could.
> Also, I haven't looked at the callchain stuff much, but does the
> callchain info contain a recognizable end delimiter? At present the
> callchain comes last, but if we add more output elements they'll
> presumably go after it, so working out where the callchain ends may
> become tricky if we're not careful.
It writes:
struct callchain_event {
u64 nr
u64 ips[nr]
};
So the first number tells how many ips are in the callchain, which
should be good enough to figure out where it ends.
> Also, let's add PERF_RECORD/PERF_EVENT bits for:
>
> * EVENT_INSTR_ADDR
I'm failing to come up with what this could be..
> * EVENT_DATA_ADDR
This would be the data address operated upon? Like what address caused
the fault/cache-miss, etc?
> * EVENT_INSTR_FLAGS
Again not quite sure what this would be.
> * EVENT_CPU_FLAGS (so we can distinguish hypervisor/kernel/user)
Currently we can based on address, an IP < 0 is kernel and > 0 is
userspace, but yeah, I see how this makes life easier.
> We would have to call into arch code to get the values for these.
I suppose all these things can be gleaned from pt_regs, so that should
be doable.
next prev parent reply other threads:[~2009-04-01 7:58 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 17:07 [PATCH 00/15] pending perf_counter bits Peter Zijlstra
2009-03-30 17:07 ` [PATCH 01/15] perf_counter: unify and fix delayed counter wakeup Peter Zijlstra
2009-03-31 5:45 ` Paul Mackerras
2009-03-31 6:37 ` Peter Zijlstra
2009-04-01 9:04 ` Ingo Molnar
2009-04-01 10:12 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 02/15] perf_counter: fix update_userpage() Peter Zijlstra
2009-04-01 10:12 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 03/15] perf_counter: kerneltop: simplify data_head read Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 04/15] perf_counter: executable mmap() information Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 05/15] perf_counter: kerneltop: parse the mmap data stream Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 06/15] perf_counter: powerpc: only reserve PMU hardware when we need it Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Paul Mackerras
2009-03-30 17:07 ` [PATCH 07/15] perf_counter: make it possible for hw_perf_counter_init to return error codes Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Paul Mackerras
2009-03-30 17:07 ` [PATCH 08/15] perf_counter: x86: proper error propagation for the x86 hw_perf_counter_init() Peter Zijlstra
2009-04-01 10:13 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 09/15] perf_counter tools: optionally scale counter values in perfstat mode Peter Zijlstra
2009-04-01 9:39 ` Ingo Molnar
2009-04-01 10:50 ` Paul Mackerras
2009-04-01 10:14 ` [tip:perfcounters/core] " Paul Mackerras
2009-03-30 17:07 ` [PATCH 10/15] perf_counter: small cleanup of the output routines Peter Zijlstra
2009-04-01 10:14 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 11/15] perf_counter: re-arrange the perf_event_type Peter Zijlstra
2009-04-01 10:14 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 12/15] pref_counter: kerneltop: update event_types Peter Zijlstra
2009-04-01 10:14 ` [tip:perfcounters/core] perf_counter tools: " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 13/15] perf_counter: provide generic callchain bits Peter Zijlstra
2009-03-31 6:12 ` Paul Mackerras
2009-03-31 6:39 ` Peter Zijlstra
2009-03-31 7:24 ` Corey Ashford
2009-03-31 8:43 ` Peter Zijlstra
2009-03-31 9:09 ` Paul Mackerras
2009-03-31 9:12 ` Paul Mackerras
2009-03-31 14:00 ` Peter Zijlstra
2009-03-31 17:11 ` Corey Ashford
2009-04-01 3:48 ` Paul Mackerras
2009-04-01 7:59 ` Peter Zijlstra [this message]
2009-04-01 8:45 ` Paul Mackerras
2009-04-01 10:00 ` Ingo Molnar
2009-04-01 11:53 ` Paul Mackerras
2009-04-01 23:25 ` Corey Ashford
2009-04-02 6:43 ` Peter Zijlstra
2009-04-02 7:41 ` Peter Zijlstra
2009-04-02 9:10 ` Paul Mackerras
2009-04-02 9:14 ` Peter Zijlstra
2009-04-01 10:14 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 14/15] perf_counter: x86: callchain support Peter Zijlstra
2009-04-01 10:14 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-30 17:07 ` [PATCH 15/15] perf_counter: pmc arbitration Peter Zijlstra
2009-04-01 10:15 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-31 5:43 ` [PATCH 00/15] pending perf_counter bits Paul Mackerras
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=1238572744.8530.2541.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=linux-kernel@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
Powered by JetHome