[MODERATED] Re: [PATCH v1 4/9] PERFv1 2

Peter Zijlstra <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Mon, Feb 04, 2019 at 05:14:05PM -0800, speck for Andi Kleen wrote:
> +static bool __use_counter3(struct perf_event *event)
> +{
> +	return event->hw.flags & PERF_X86_EVENT_ABORT_TSX;
> +}
> +
> +static bool use_counter3(struct perf_event *event)
> +{
> +	return __use_counter3(event) ||
> +		(event->group_leader && __use_counter3(event->group_leader));
> +}

See; I _really_ hate this per-event noodling.

Why not just have the sysctl tell us if PMC3 is available or not and set
FRA when PMC3 gets selected, teh end.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.