Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux