lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 May 2015 15:17:37 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Kan Liang <kan.liang@...el.com>
Cc:	mingo@...nel.org, acme@...radead.org, eranian@...gle.com,
	andi@...stfloor.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V7 3/6] perf, x86: handle multiple records in PEBS buffer

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@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ