Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147492
b: refs/heads/master
c: 475c557
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed May 24, 2009
1 parent a7e2451 commit 56ea3b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 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: 082ff5a2767a0679ee543f14883adbafb631ffbe
refs/heads/master: 475c55797323b67435083f6e2eb8ee670f6410ec
1 change: 0 additions & 1 deletion trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ struct perf_counter_context {
struct list_head event_list;
int nr_counters;
int nr_active;
int nr_enabled;
int is_active;
atomic_t refcount;
struct task_struct *task;
Expand Down
11 changes: 1 addition & 10 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ list_add_counter(struct perf_counter *counter, struct perf_counter_context *ctx)

list_add_rcu(&counter->event_entry, &ctx->event_list);
ctx->nr_counters++;
if (counter->state >= PERF_COUNTER_STATE_INACTIVE)
ctx->nr_enabled++;
}

/*
Expand All @@ -150,8 +148,6 @@ list_del_counter(struct perf_counter *counter, struct perf_counter_context *ctx)
if (list_empty(&counter->list_entry))
return;
ctx->nr_counters--;
if (counter->state >= PERF_COUNTER_STATE_INACTIVE)
ctx->nr_enabled--;

list_del_init(&counter->list_entry);
list_del_rcu(&counter->event_entry);
Expand Down Expand Up @@ -406,7 +402,6 @@ static void __perf_counter_disable(void *info)
else
counter_sched_out(counter, cpuctx, ctx);
counter->state = PERF_COUNTER_STATE_OFF;
ctx->nr_enabled--;
}

spin_unlock_irqrestore(&ctx->lock, flags);
Expand Down Expand Up @@ -448,7 +443,6 @@ static void perf_counter_disable(struct perf_counter *counter)
if (counter->state == PERF_COUNTER_STATE_INACTIVE) {
update_counter_times(counter);
counter->state = PERF_COUNTER_STATE_OFF;
ctx->nr_enabled--;
}

spin_unlock_irq(&ctx->lock);
Expand Down Expand Up @@ -759,7 +753,6 @@ static void __perf_counter_enable(void *info)
goto unlock;
counter->state = PERF_COUNTER_STATE_INACTIVE;
counter->tstamp_enabled = ctx->time - counter->total_time_enabled;
ctx->nr_enabled++;

/*
* If the counter is in a group and isn't the group leader,
Expand Down Expand Up @@ -850,7 +843,6 @@ static void perf_counter_enable(struct perf_counter *counter)
counter->state = PERF_COUNTER_STATE_INACTIVE;
counter->tstamp_enabled =
ctx->time - counter->total_time_enabled;
ctx->nr_enabled++;
}
out:
spin_unlock_irq(&ctx->lock);
Expand Down Expand Up @@ -910,8 +902,7 @@ static int context_equiv(struct perf_counter_context *ctx1,
struct perf_counter_context *ctx2)
{
return ctx1->parent_ctx && ctx1->parent_ctx == ctx2->parent_ctx
&& ctx1->parent_gen == ctx2->parent_gen
&& ctx1->nr_enabled == ctx2->nr_enabled;
&& ctx1->parent_gen == ctx2->parent_gen;
}

/*
Expand Down

0 comments on commit 56ea3b4

Please sign in to comment.