Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147161
b: refs/heads/master
c: 0cc0c02
h: refs/heads/master
i:
  147159: c2956aa
v: v3
  • Loading branch information
Ingo Molnar committed Dec 14, 2008
1 parent 73b6eed commit 321f5b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 029af8c753bb5a7432aa1ed38bf61fe2c2f66d17
refs/heads/master: 0cc0c027d4e028632933f1be2dc4cd730358183b
14 changes: 12 additions & 2 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,8 +1273,19 @@ __perf_counter_exit_task(struct task_struct *child,
local_irq_disable();
perf_flags = hw_perf_save_disable();

if (child_counter->state == PERF_COUNTER_STATE_ACTIVE)
if (child_counter->state == PERF_COUNTER_STATE_ACTIVE) {
struct perf_cpu_context *cpuctx;

cpuctx = &__get_cpu_var(perf_cpu_context);

child_counter->hw_ops->hw_perf_counter_disable(child_counter);
child_counter->state = PERF_COUNTER_STATE_INACTIVE;
child_counter->oncpu = -1;

cpuctx->active_oncpu--;
child_ctx->nr_active--;
}

list_del_init(&child_counter->list_entry);

hw_perf_restore(perf_flags);
Expand Down Expand Up @@ -1539,4 +1550,3 @@ static int __init perf_counter_sysfs_init(void)
&perfclass_attr_group);
}
device_initcall(perf_counter_sysfs_init);

0 comments on commit 321f5b0

Please sign in to comment.