perf_counter: Remove unused prev_state field
authorPaul Mackerras <paulus@samba.org>
Mon, 1 Jun 2009 07:53:16 +0000 (17:53 +1000)
committerIngo Molnar <mingo@elte.hu>
Tue, 2 Jun 2009 11:10:55 +0000 (13:10 +0200)
This removes the prev_state field of struct perf_counter since
it is now unused.  It was only used by the cpu migration
counter, which doesn't use it any more.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <18979.35052.915728.626374@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
kernel/perf_counter.c

index deb9acf9ad2a3ad6caaf26a3a3c1b72d64210626..d970fbc16afd597e3213e33650e1e7254cc0ed01 100644 (file)
@@ -427,7 +427,6 @@ struct perf_counter {
        const struct pmu                *pmu;
 
        enum perf_counter_active_state  state;
-       enum perf_counter_active_state  prev_state;
        atomic64_t                      count;
 
        /*
index cd94cf3bf9e2a652dd39b5a95cb6f29b0c6bbcc5..fbed4d28ad7d7c716a18d0b7cd65dc6e12af7fb1 100644 (file)
@@ -572,7 +572,6 @@ group_sched_in(struct perf_counter *group_counter,
        if (ret)
                return ret < 0 ? ret : 0;
 
-       group_counter->prev_state = group_counter->state;
        if (counter_sched_in(group_counter, cpuctx, ctx, cpu))
                return -EAGAIN;
 
@@ -580,7 +579,6 @@ group_sched_in(struct perf_counter *group_counter,
         * Schedule in siblings as one group (if any):
         */
        list_for_each_entry(counter, &group_counter->sibling_list, list_entry) {
-               counter->prev_state = counter->state;
                if (counter_sched_in(counter, cpuctx, ctx, cpu)) {
                        partial_group = counter;
                        goto group_error;
@@ -657,7 +655,6 @@ static void add_counter_to_ctx(struct perf_counter *counter,
                               struct perf_counter_context *ctx)
 {
        list_add_counter(counter, ctx);
-       counter->prev_state = PERF_COUNTER_STATE_OFF;
        counter->tstamp_enabled = ctx->time;
        counter->tstamp_running = ctx->time;
        counter->tstamp_stopped = ctx->time;
@@ -820,7 +817,6 @@ static void __perf_counter_enable(void *info)
        ctx->is_active = 1;
        update_context_time(ctx);
 
-       counter->prev_state = counter->state;
        if (counter->state >= PERF_COUNTER_STATE_INACTIVE)
                goto unlock;
        counter->state = PERF_COUNTER_STATE_INACTIVE;