Skip to content
Snippets Groups Projects
Commit a61ffc11 authored by meto's avatar meto
Browse files

fixes

parent 62799805
No related branches found
No related tags found
No related merge requests found
...@@ -115,8 +115,6 @@ static struct task_struct * pick_next_task_pb(struct rq *rq, ...@@ -115,8 +115,6 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
next_mode = determine_next_mode_pb(rq); next_mode = determine_next_mode_pb(rq);
pb->mode = next_mode; pb->mode = next_mode;
int perf_init_res;
// The mode does not change --> no behavior change is needed // The mode does not change --> no behavior change is needed
if (next_mode == PB_EXEC_MODE) if (next_mode == PB_EXEC_MODE)
{ {
...@@ -131,7 +129,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq, ...@@ -131,7 +129,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
printk(KERN_DEBUG "PLAN DONE\n"); printk(KERN_DEBUG "PLAN DONE\n");
pb->mode = PB_DISABLED_MODE; pb->mode = PB_DISABLED_MODE;
}else{ }else{
perf_init_res = init_perf_event(pb->plan[pb->c_entry], &pb->pevent); int perf_init_res = init_perf_event(pb->plan[pb->c_entry], &pb->pevent);
if(perf_init_res < 0){ if(perf_init_res < 0){
//initialization error detection/handling could happen here //initialization error detection/handling could happen here
printk(KERN_WARNING "PB EXEC,START,%u,%llu: FAILED OPEN PERF EVENT\n", pb->c_entry, sched_clock()); printk(KERN_WARNING "PB EXEC,START,%u,%llu: FAILED OPEN PERF EVENT\n", pb->c_entry, sched_clock());
...@@ -143,7 +141,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq, ...@@ -143,7 +141,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
}else if(current_mode == PB_ADMIN_MODE){ }else if(current_mode == PB_ADMIN_MODE){
printk(KERN_DEBUG "PB ADMIN,STOP,%u,%llu\n", pb->c_entry, sched_clock()); printk(KERN_DEBUG "PB ADMIN,STOP,%u,%llu\n", pb->c_entry, sched_clock());
}else{ }else{
perf_init_res = init_perf_event(pb->plan[pb->c_entry], &pb->pevent); int perf_init_res = init_perf_event(pb->plan[pb->c_entry], &pb->pevent);
if(perf_init_res < 0){ if(perf_init_res < 0){
//initialization error detection/handling could happen here //initialization error detection/handling could happen here
......
...@@ -22,7 +22,7 @@ int init_perf_event(struct plan_entry plan_entry, struct perf_event **pevent){ ...@@ -22,7 +22,7 @@ int init_perf_event(struct plan_entry plan_entry, struct perf_event **pevent){
// cpu = -1 -> cpu indepented (assumed to be regulated by plan) // cpu = -1 -> cpu indepented (assumed to be regulated by plan)
*pevent = perf_event_create(&pe, smp_processor_id()); *pevent = perf_event_create(&pe, smp_processor_id());
if (IS_ERR(event)) { if (IS_ERR(pevent)) {
printk(KERN_WARNING "PB ERROR INITIALISING PERF EVENT\n"); printk(KERN_WARNING "PB ERROR INITIALISING PERF EVENT\n");
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment