mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, kan.liang@linux.intel.com,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v4 1/7] perf: Allow normal events to be sources of AUX data
Date: Mon, 5 Aug 2019 15:18:56 +0200	[thread overview]
Message-ID: <20190805131856.GM2349@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190805071618.29468-2-alexander.shishkin@linux.intel.com>

On Mon, Aug 05, 2019 at 10:16:12AM +0300, Alexander Shishkin wrote:
> In some cases, ordinary (non-AUX) events can generate data for AUX events.
> For example, PEBS events can come out as records in the Intel PT stream
> instead of their usual DS records, if configured to do so.
> 
> One requirement for such events is to consistently schedule together, to
> ensure that the data from the "AUX source" events isn't lost while their
> corresponding AUX event is not scheduled. We use grouping to provide this
> guarantee: an "AUX source" event can be added to a group where an AUX event
> is a group leader, and provided that the former supports writing to the
> latter.

Two niggles -- and sorry for not bringing those up sooner:

> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index 7198ddd0c6b1..213cae95e713 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -374,7 +374,8 @@ struct perf_event_attr {
>  				namespaces     :  1, /* include namespaces data */
>  				ksymbol        :  1, /* include ksymbol events */
>  				bpf_event      :  1, /* include bpf events */
> -				__reserved_1   : 33;
> +				aux_source     :  1, /* generate AUX records instead of events */
> +				__reserved_1   : 32;
>  
>  	union {
>  		__u32		wakeup_events;	  /* wakeup every n events */

The name: "aux_source" seems to imply that we change the source to
'aux', while in fact it is the destination we change.

So we want to %s/aux_source/aux_output/ on the whole thing?

> +	/*
> +	 * Our group leader must be an aux event if we want to be
> +	 * an aux_source. This way, the aux event will precede its
> +	 * aux_source events in the group, and therefore will always
> +	  schedule first.
> +	 */

You fudged the comment there.

  reply	other threads:[~2019-08-05 13:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05  7:16 [PATCH v4 0/7] perf, intel: Add support for PEBS output to Intel PT Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 1/7] perf: Allow normal events to be sources of AUX data Alexander Shishkin
2019-08-05 13:18   ` Peter Zijlstra [this message]
2019-08-05  7:16 ` [PATCH v4 2/7] perf/x86/intel: Support PEBS output to PT Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 3/7] perf tools: Add aux_source attribute flag Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 4/7] perf tools: Add itrace option 'o' to synthesize aux-source events Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 5/7] perf intel-pt: Process options for PEBS event synthesis Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 6/7] perf tools: Add aux-source config term Alexander Shishkin
2019-08-05  7:16 ` [PATCH v4 7/7] perf intel-pt: Add brief documentation for PEBS via Intel PT Alexander Shishkin

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=20190805131856.GM2349@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.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

all inboxes | Powered by JetHome®