|
@@ -1915,7 +1915,7 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
|
|
/*
|
|
/*
|
|
* no exclusion needed
|
|
* no exclusion needed
|
|
*/
|
|
*/
|
|
- if (!excl_cntrs)
|
|
|
|
|
|
+ if (WARN_ON_ONCE(!excl_cntrs))
|
|
return;
|
|
return;
|
|
|
|
|
|
xl = &excl_cntrs->states[tid];
|
|
xl = &excl_cntrs->states[tid];
|
|
@@ -1949,7 +1949,7 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
|
|
/*
|
|
/*
|
|
* no exclusion needed
|
|
* no exclusion needed
|
|
*/
|
|
*/
|
|
- if (!excl_cntrs)
|
|
|
|
|
|
+ if (WARN_ON_ONCE(!excl_cntrs))
|
|
return;
|
|
return;
|
|
|
|
|
|
xl = &excl_cntrs->states[tid];
|
|
xl = &excl_cntrs->states[tid];
|
|
@@ -1985,7 +1985,7 @@ intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event,
|
|
/*
|
|
/*
|
|
* no exclusion needed
|
|
* no exclusion needed
|
|
*/
|
|
*/
|
|
- if (!excl_cntrs)
|
|
|
|
|
|
+ if (WARN_ON_ONCE(!excl_cntrs))
|
|
return c;
|
|
return c;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2126,9 +2126,7 @@ static void intel_put_excl_constraints(struct cpu_hw_events *cpuc,
|
|
if (cpuc->is_fake)
|
|
if (cpuc->is_fake)
|
|
return;
|
|
return;
|
|
|
|
|
|
- WARN_ON_ONCE(!excl_cntrs);
|
|
|
|
-
|
|
|
|
- if (!excl_cntrs)
|
|
|
|
|
|
+ if (WARN_ON_ONCE(!excl_cntrs))
|
|
return;
|
|
return;
|
|
|
|
|
|
xl = &excl_cntrs->states[tid];
|
|
xl = &excl_cntrs->states[tid];
|
|
@@ -2193,15 +2191,13 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt
|
|
struct intel_excl_states *xl;
|
|
struct intel_excl_states *xl;
|
|
int tid = cpuc->excl_thread_id;
|
|
int tid = cpuc->excl_thread_id;
|
|
|
|
|
|
- if (cpuc->is_fake || !c)
|
|
|
|
|
|
+ if (cpuc->is_fake || !is_ht_workaround_enabled())
|
|
return;
|
|
return;
|
|
|
|
|
|
- if (!(c->flags & PERF_X86_EVENT_DYNAMIC))
|
|
|
|
|
|
+ if (WARN_ON_ONCE(!excl_cntrs))
|
|
return;
|
|
return;
|
|
|
|
|
|
- WARN_ON_ONCE(!excl_cntrs);
|
|
|
|
-
|
|
|
|
- if (!excl_cntrs)
|
|
|
|
|
|
+ if (!(c->flags & PERF_X86_EVENT_DYNAMIC))
|
|
return;
|
|
return;
|
|
|
|
|
|
xl = &excl_cntrs->states[tid];
|
|
xl = &excl_cntrs->states[tid];
|