perf timechart: Move wake_events list to 'struct timechart'
authorArnaldo Carvalho de Melo <[email protected]>
Thu, 28 Nov 2013 16:26:33 +0000 (13:26 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 2 Dec 2013 12:22:47 +0000 (09:22 -0300)
Removing another global variable.

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stanislav Fomichev <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-timechart.c

index 8ee0ff1777a8145542236d5ae6e16d4358c2801b..0bda620a717dc056ca7bd23416178ce295cf7a7a 100644 (file)
 
 struct per_pid;
 struct power_event;
+struct wake_event;
 
 struct timechart {
        struct perf_tool        tool;
        struct per_pid          *all_data;
        struct power_event      *power_events;
+       struct wake_event       *wake_events;
        int                     proc_num;
        unsigned int            numcpus;
        u64                     min_freq,       /* Lowest CPU frequency seen */
@@ -148,8 +150,6 @@ struct wake_event {
        const char *backtrace;
 };
 
-static struct wake_event     *wake_events;
-
 struct process_filter {
        char                    *name;
        int                     pid;
@@ -383,8 +383,8 @@ static void sched_wakeup(struct timechart *tchart, int cpu, u64 timestamp,
                we->waker = -1;
 
        we->wakee = wakee;
-       we->next = wake_events;
-       wake_events = we;
+       we->next = tchart->wake_events;
+       tchart->wake_events = we;
        p = find_create_pid(tchart, we->wakee);
 
        if (p && p->current && p->current->state == TYPE_NONE) {
@@ -764,7 +764,7 @@ static void draw_wakeups(struct timechart *tchart)
        struct per_pid *p;
        struct per_pidcomm *c;
 
-       we = wake_events;
+       we = tchart->wake_events;
        while (we) {
                int from = 0, to = 0;
                char *task_from = NULL, *task_to = NULL;