Skip to content
Snippets Groups Projects
Commit b28facd7 authored by mandersch's avatar mandersch
Browse files

Fix a Bug where the last task before mode switch would be run again if its...

Fix a Bug where the last task before mode switch would be run again if its performance counter could not be read before switch, accidentally doubling its instruction count when measured
parent e7c15e0e
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq, ...@@ -147,7 +147,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
} }
} }
if (current_mode == PB_EXEC_MODE && !pb->is_preempted) { if ((current_mode == PB_EXEC_MODE && !pb->is_preempted) || (pb->is_preempted && !pb->is_in_critical)) {
unsigned int c_entry_curr; unsigned int c_entry_curr;
u64 perf_counter; u64 perf_counter;
u64 counter_diff; u64 counter_diff;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment