|
@@ -811,7 +811,6 @@ void hw_perf_enable(void)
|
|
|
* step2: reprogram moved events into new counters
|
|
|
*/
|
|
|
for (i = 0; i < n_running; i++) {
|
|
|
-
|
|
|
event = cpuc->event_list[i];
|
|
|
hwc = &event->hw;
|
|
|
|
|
@@ -826,21 +825,16 @@ void hw_perf_enable(void)
|
|
|
continue;
|
|
|
|
|
|
x86_pmu_stop(event);
|
|
|
-
|
|
|
- hwc->idx = -1;
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < cpuc->n_events; i++) {
|
|
|
-
|
|
|
event = cpuc->event_list[i];
|
|
|
hwc = &event->hw;
|
|
|
|
|
|
- if (i < n_running &&
|
|
|
- match_prev_assignment(hwc, cpuc, i))
|
|
|
- continue;
|
|
|
-
|
|
|
- if (hwc->idx == -1)
|
|
|
+ if (!match_prev_assignment(hwc, cpuc, i))
|
|
|
x86_assign_hw_event(event, cpuc, i);
|
|
|
+ else if (i < n_running)
|
|
|
+ continue;
|
|
|
|
|
|
x86_pmu_start(event);
|
|
|
}
|