Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166897
b: refs/heads/master
c: 8c9ed8e
h: refs/heads/master
i:
  166895: 668d9a8
v: v3
  • Loading branch information
Xiao Guangrong authored and Ingo Molnar committed Oct 1, 2009
1 parent 2abb987 commit 9367d99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39a90a8ef17fe6fbf4b45e46e3c10d3b8b4a3dea
refs/heads/master: 8c9ed8e14c342ec5e7f27e7e498f62409a10eb29
30 changes: 8 additions & 22 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,14 +1030,10 @@ void __perf_event_sched_out(struct perf_event_context *ctx,
update_context_time(ctx);

perf_disable();
if (ctx->nr_active) {
list_for_each_entry(event, &ctx->group_list, group_entry) {
if (event != event->group_leader)
event_sched_out(event, cpuctx, ctx);
else
group_sched_out(event, cpuctx, ctx);
}
}
if (ctx->nr_active)
list_for_each_entry(event, &ctx->group_list, group_entry)
group_sched_out(event, cpuctx, ctx);

perf_enable();
out:
spin_unlock(&ctx->lock);
Expand Down Expand Up @@ -1258,12 +1254,8 @@ __perf_event_sched_in(struct perf_event_context *ctx,
if (event->cpu != -1 && event->cpu != cpu)
continue;

if (event != event->group_leader)
event_sched_in(event, cpuctx, ctx, cpu);
else {
if (group_can_go_on(event, cpuctx, 1))
group_sched_in(event, cpuctx, ctx, cpu);
}
if (group_can_go_on(event, cpuctx, 1))
group_sched_in(event, cpuctx, ctx, cpu);

/*
* If this pinned group hasn't been scheduled,
Expand Down Expand Up @@ -1291,15 +1283,9 @@ __perf_event_sched_in(struct perf_event_context *ctx,
if (event->cpu != -1 && event->cpu != cpu)
continue;

if (event != event->group_leader) {
if (event_sched_in(event, cpuctx, ctx, cpu))
if (group_can_go_on(event, cpuctx, can_add_hw))
if (group_sched_in(event, cpuctx, ctx, cpu))
can_add_hw = 0;
} else {
if (group_can_go_on(event, cpuctx, can_add_hw)) {
if (group_sched_in(event, cpuctx, ctx, cpu))
can_add_hw = 0;
}
}
}
perf_enable();
out:
Expand Down

0 comments on commit 9367d99

Please sign in to comment.