aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-timechart.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-11-28 11:26:33 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-02 07:22:47 -0500
commit436b0da02fc12970f2f5ecdef03160c7a401b121 (patch)
treeeff77ca35c004b0f45e6f866eb9d83b787d72c55 /tools/perf/builtin-timechart.c
parent66cc3ada4ec3c277a21cba9996cc0cab3409033d (diff)
perf timechart: Move wake_events list to 'struct timechart'
Removing another global variable. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-14rpuci11l2s0o01yta87kxe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r--tools/perf/builtin-timechart.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 8ee0ff1777a8..0bda620a717d 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -43,11 +43,13 @@
43 43
44struct per_pid; 44struct per_pid;
45struct power_event; 45struct power_event;
46struct wake_event;
46 47
47struct timechart { 48struct timechart {
48 struct perf_tool tool; 49 struct perf_tool tool;
49 struct per_pid *all_data; 50 struct per_pid *all_data;
50 struct power_event *power_events; 51 struct power_event *power_events;
52 struct wake_event *wake_events;
51 int proc_num; 53 int proc_num;
52 unsigned int numcpus; 54 unsigned int numcpus;
53 u64 min_freq, /* Lowest CPU frequency seen */ 55 u64 min_freq, /* Lowest CPU frequency seen */
@@ -148,8 +150,6 @@ struct wake_event {
148 const char *backtrace; 150 const char *backtrace;
149}; 151};
150 152
151static struct wake_event *wake_events;
152
153struct process_filter { 153struct process_filter {
154 char *name; 154 char *name;
155 int pid; 155 int pid;
@@ -383,8 +383,8 @@ static void sched_wakeup(struct timechart *tchart, int cpu, u64 timestamp,
383 we->waker = -1; 383 we->waker = -1;
384 384
385 we->wakee = wakee; 385 we->wakee = wakee;
386 we->next = wake_events; 386 we->next = tchart->wake_events;
387 wake_events = we; 387 tchart->wake_events = we;
388 p = find_create_pid(tchart, we->wakee); 388 p = find_create_pid(tchart, we->wakee);
389 389
390 if (p && p->current && p->current->state == TYPE_NONE) { 390 if (p && p->current && p->current->state == TYPE_NONE) {
@@ -764,7 +764,7 @@ static void draw_wakeups(struct timechart *tchart)
764 struct per_pid *p; 764 struct per_pid *p;
765 struct per_pidcomm *c; 765 struct per_pidcomm *c;
766 766
767 we = wake_events; 767 we = tchart->wake_events;
768 while (we) { 768 while (we) {
769 int from = 0, to = 0; 769 int from = 0, to = 0;
770 char *task_from = NULL, *task_to = NULL; 770 char *task_from = NULL, *task_to = NULL;