Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147501
b: refs/heads/master
c: 771d7cd
h: refs/heads/master
i:
  147499: 0fa445e
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 25, 2009
1 parent 9af8a9b commit 006fd4c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 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: e527ea312f31e88a7fa5472b71db71c565b0d44f
refs/heads/master: 771d7cde144d87f2d1fbee4da3c6234d61f7e42a
48 changes: 24 additions & 24 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,30 +1067,6 @@ static void perf_counter_cpu_sched_in(struct perf_cpu_context *cpuctx, int cpu)
__perf_counter_sched_in(ctx, cpuctx, cpu);
}

int perf_counter_task_enable(void)
{
struct perf_counter *counter;

mutex_lock(&current->perf_counter_mutex);
list_for_each_entry(counter, &current->perf_counter_list, owner_entry)
perf_counter_enable(counter);
mutex_unlock(&current->perf_counter_mutex);

return 0;
}

int perf_counter_task_disable(void)
{
struct perf_counter *counter;

mutex_lock(&current->perf_counter_mutex);
list_for_each_entry(counter, &current->perf_counter_list, owner_entry)
perf_counter_disable(counter);
mutex_unlock(&current->perf_counter_mutex);

return 0;
}

static void perf_log_period(struct perf_counter *counter, u64 period);

static void perf_adjust_freq(struct perf_counter_context *ctx)
Expand Down Expand Up @@ -1505,6 +1481,30 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return 0;
}

int perf_counter_task_enable(void)
{
struct perf_counter *counter;

mutex_lock(&current->perf_counter_mutex);
list_for_each_entry(counter, &current->perf_counter_list, owner_entry)
perf_counter_for_each_child(counter, perf_counter_enable);
mutex_unlock(&current->perf_counter_mutex);

return 0;
}

int perf_counter_task_disable(void)
{
struct perf_counter *counter;

mutex_lock(&current->perf_counter_mutex);
list_for_each_entry(counter, &current->perf_counter_list, owner_entry)
perf_counter_for_each_child(counter, perf_counter_disable);
mutex_unlock(&current->perf_counter_mutex);

return 0;
}

/*
* Callers need to ensure there can be no nesting of this function, otherwise
* the seqlock logic goes bad. We can not serialize this because the arch
Expand Down

0 comments on commit 006fd4c

Please sign in to comment.