[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171104132611.GE8454@krava>
Date: Sat, 4 Nov 2017 14:26:11 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Megha Dey <megha.dey@...ux.intel.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, andriy.shevchenko@...ux.intel.com,
kstewart@...uxfoundation.org, yu-cheng.yu@...el.com,
len.brown@...el.com, gregkh@...uxfoundation.org,
peterz@...radead.org, acme@...nel.org,
alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
vikas.shivappa@...ux.intel.com, pombredanne@...b.com,
me@...ehuey.com, bp@...e.de, grzegorz.andrejczuk@...el.com,
tony.luck@...el.com, corbet@....net, ravi.v.shankar@...el.com,
megha.dey@...el.com
Subject: Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring
support
On Fri, Nov 03, 2017 at 11:00:05AM -0700, Megha Dey wrote:
SNIP
> +
> +static void intel_bm_event_update(struct perf_event *event)
> +{
> + union bm_detect_status cur_stat;
> +
> + rdmsrl(BR_DETECT_STATUS_MSR, cur_stat.raw);
> + local64_set(&event->hw.prev_count, (uint64_t)cur_stat.raw);
> +}
> +
> +static void intel_bm_event_stop(struct perf_event *event, int mode)
> +{
> + wrmsrl(BR_DETECT_COUNTER_CONFIG_BASE + event->id,
> + (event->hw.bm_counter_conf & ~1));
> +
> + intel_bm_event_update(event);
> +}
> +
> +static void intel_bm_event_del(struct perf_event *event, int flags)
> +{
> + intel_bm_event_stop(event, flags);
> +}
> +
> +static void intel_bm_event_read(struct perf_event *event)
> +{
> +}
should you call intel_bm_event_update in here? so the read syscall
gets updated data in case the case the event is active
jirka
Powered by blists - more mailing lists