File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -834,14 +834,24 @@ static inline void pebs_update_threshold(struct cpu_hw_events *cpuc)
834
834
static void
835
835
pebs_update_state (bool needed_cb , struct cpu_hw_events * cpuc , struct pmu * pmu )
836
836
{
837
+ /*
838
+ * Make sure we get updated with the first PEBS
839
+ * event. It will trigger also during removal, but
840
+ * that does not hurt:
841
+ */
842
+ bool update = cpuc -> n_pebs == 1 ;
843
+
837
844
if (needed_cb != pebs_needs_sched_cb (cpuc )) {
838
845
if (!needed_cb )
839
846
perf_sched_cb_inc (pmu );
840
847
else
841
848
perf_sched_cb_dec (pmu );
842
849
843
- pebs_update_threshold ( cpuc ) ;
850
+ update = true ;
844
851
}
852
+
853
+ if (update )
854
+ pebs_update_threshold (cpuc );
845
855
}
846
856
847
857
void intel_pmu_pebs_add (struct perf_event * event )
You can’t perform that action at this time.
0 commit comments