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