Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188247
b: refs/heads/master
c: 32975a4
h: refs/heads/master
i:
  188245: a0018e2
  188243: 6780720
  188239: 613abea
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 10, 2010
1 parent a8f9cd8 commit 3e8b24e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 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: 3f6da3905398826d85731247e7fbcf53400c18bd
refs/heads/master: 32975a4f114be52286f9a5bf6c230dbb8c0e1903
16 changes: 3 additions & 13 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,15 @@ void __weak perf_event_print_debug(void) { }

static DEFINE_PER_CPU(int, perf_disable_count);

void __perf_disable(void)
{
__get_cpu_var(perf_disable_count)++;
}

bool __perf_enable(void)
{
return !--__get_cpu_var(perf_disable_count);
}

void perf_disable(void)
{
__perf_disable();
hw_perf_disable();
if (!__get_cpu_var(perf_disable_count)++)
hw_perf_disable();
}

void perf_enable(void)
{
if (__perf_enable())
if (!--__get_cpu_var(perf_disable_count))
hw_perf_enable();
}

Expand Down

0 comments on commit 3e8b24e

Please sign in to comment.