From: Peter Zijlstra <peterz@infradead.org>
To: Kan Liang <kan.liang@intel.com>
Cc: mingo@kernel.org, acme@infradead.org, eranian@google.com,
andi@firstfloor.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V7 3/6] perf, x86: handle multiple records in PEBS buffer
Date: Tue, 5 May 2015 15:17:37 +0200 [thread overview]
Message-ID: <20150505131737.GC16478@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150505130723.GN23123@twins.programming.kicks-ass.net>
On Tue, May 05, 2015 at 03:07:23PM +0200, Peter Zijlstra wrote:
> On Mon, Apr 20, 2015 at 04:07:47AM -0400, Kan Liang wrote:
> > From: Yan, Zheng <zheng.z.yan@intel.com>
> > +static void perf_log_lost(struct perf_event *event)
> > +{
> > + struct perf_output_handle handle;
> > + struct perf_sample_data sample;
> > + int ret;
> > +
> > + struct {
> > + struct perf_event_header header;
> > + u64 id;
> > + u64 lost;
> > + } lost_event = {
> > + .header = {
> > + .type = PERF_RECORD_LOST,
> > + .misc = 0,
> > + .size = sizeof(lost_event),
> > + },
> > + .id = event->id,
> > + .lost = 1,
> > + };
> > +
> > + perf_event_header__init_id(&lost_event.header, &sample, event);
> > +
> > + ret = perf_output_begin(&handle, event,
> > + lost_event.header.size);
> > + if (ret)
> > + return;
> > +
> > + perf_output_put(&handle, lost_event);
> > + perf_event__output_id_sample(event, &handle, &sample);
> > + perf_output_end(&handle);
> > +}
>
> RECORDs are generic, and should live in the core code.
>
> Also, you should introduce this RECORD in a separate patch.
On that, this is lacking a RECORD definition in
include/uapi/linux/perf_event.h:perf_event_type
next prev parent reply other threads:[~2015-05-05 13:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 8:07 [PATCH V7 0/6] large PEBS interrupt threshold Kan Liang
2015-04-20 8:07 ` [PATCH V7 1/6] perf, x86: use the PEBS auto reload mechanism when possible Kan Liang
2015-04-20 8:07 ` [PATCH V7 2/6] perf, x86: introduce setup_pebs_sample_data() Kan Liang
2015-04-20 8:07 ` [PATCH V7 3/6] perf, x86: handle multiple records in PEBS buffer Kan Liang
2015-05-05 13:07 ` Peter Zijlstra
2015-05-05 13:17 ` Peter Zijlstra [this message]
2015-05-05 16:36 ` Liang, Kan
2015-05-05 17:00 ` Peter Zijlstra
2015-05-05 13:16 ` Peter Zijlstra
2015-05-05 16:30 ` Liang, Kan
2015-05-05 17:08 ` Peter Zijlstra
2015-05-05 17:22 ` Liang, Kan
2015-05-06 13:01 ` Andi Kleen
2015-05-06 13:13 ` Peter Zijlstra
2015-04-20 8:07 ` [PATCH V7 4/6] perf, x86: large PEBS interrupt threshold Kan Liang
2015-04-20 8:07 ` [PATCH V7 5/6] perf, x86: drain PEBS buffer during context switch Kan Liang
2015-04-20 8:07 ` [PATCH V7 6/6] perf, x86: enlarge PEBS buffer Kan Liang
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=20150505131737.GC16478@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@infradead.org \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.