aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/perf_counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r--kernel/perf_counter.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index b2e838959f3e..0fe22c916e29 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -89,8 +89,7 @@ list_del_counter(struct perf_counter *counter, struct perf_counter_context *ctx)
89 list_for_each_entry_safe(sibling, tmp, 89 list_for_each_entry_safe(sibling, tmp,
90 &counter->sibling_list, list_entry) { 90 &counter->sibling_list, list_entry) {
91 91
92 list_del_init(&sibling->list_entry); 92 list_move_tail(&sibling->list_entry, &ctx->counter_list);
93 list_add_tail(&sibling->list_entry, &ctx->counter_list);
94 sibling->group_leader = sibling; 93 sibling->group_leader = sibling;
95 } 94 }
96} 95}
@@ -959,8 +958,7 @@ static void rotate_ctx(struct perf_counter_context *ctx)
959 */ 958 */
960 perf_flags = hw_perf_save_disable(); 959 perf_flags = hw_perf_save_disable();
961 list_for_each_entry(counter, &ctx->counter_list, list_entry) { 960 list_for_each_entry(counter, &ctx->counter_list, list_entry) {
962 list_del(&counter->list_entry); 961 list_move_tail(&counter->list_entry, &ctx->counter_list);
963 list_add_tail(&counter->list_entry, &ctx->counter_list);
964 break; 962 break;
965 } 963 }
966 hw_perf_restore(perf_flags); 964 hw_perf_restore(perf_flags);