Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434009 > unrolled thread

Re: [tip:perf/core] perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-06-29 21:40 +0200
Last post2016-06-29 21:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [tip:perf/core] perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers Peter Zijlstra <peterz@infradead.org> - 2016-06-29 21:40 +0200

#1434009 — Re: [tip:perf/core] perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-29 21:40 +0200
SubjectRe: [tip:perf/core] perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers
Message-ID<rPtv3-8eL-1@gated-at.bofh.it>
On Mon, Jun 27, 2016 at 05:56:02AM -0700, tip-bot for Peter Zijlstra wrote:
> +static inline u64 rdlbr_from(unsigned int idx)
> +{
> +	u64 val;
> +
> +	rdmsrl(x86_pmu.lbr_from + idx, val);
> +
> +	return lbr_from_signext_quirk_rd(val);
> +}
> +
> +static inline u64 rdlbr_to(unsigned int idx)
> +{
> +	u64 val;
> +
> +	rdmsrl(x86_pmu.lbr_from + idx, val);

Things work loads better when we use:

	rdmsrl(x86_pmu.lbr_to + idx, val);

:-/

> +
>  	return val;
>  }

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web