Commit 436b0da0 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 66cc3ada
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -43,11 +43,13 @@


struct per_pid;
struct per_pid;
struct power_event;
struct power_event;
struct wake_event;


struct timechart {
struct timechart {
	struct perf_tool	tool;
	struct perf_tool	tool;
	struct per_pid		*all_data;
	struct per_pid		*all_data;
	struct power_event	*power_events;
	struct power_event	*power_events;
	struct wake_event	*wake_events;
	int			proc_num;
	int			proc_num;
	unsigned int		numcpus;
	unsigned int		numcpus;
	u64			min_freq,	/* Lowest CPU frequency seen */
	u64			min_freq,	/* Lowest CPU frequency seen */
@@ -148,8 +150,6 @@ struct wake_event {
	const char *backtrace;
	const char *backtrace;
};
};


static struct wake_event     *wake_events;

struct process_filter {
struct process_filter {
	char			*name;
	char			*name;
	int			pid;
	int			pid;
@@ -383,8 +383,8 @@ static void sched_wakeup(struct timechart *tchart, int cpu, u64 timestamp,
		we->waker = -1;
		we->waker = -1;


	we->wakee = wakee;
	we->wakee = wakee;
	we->next = wake_events;
	we->next = tchart->wake_events;
	wake_events = we;
	tchart->wake_events = we;
	p = find_create_pid(tchart, we->wakee);
	p = find_create_pid(tchart, we->wakee);


	if (p && p->current && p->current->state == TYPE_NONE) {
	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_pid *p;
	struct per_pidcomm *c;
	struct per_pidcomm *c;


	we = wake_events;
	we = tchart->wake_events;
	while (we) {
	while (we) {
		int from = 0, to = 0;
		int from = 0, to = 0;
		char *task_from = NULL, *task_to = NULL;
		char *task_from = NULL, *task_to = NULL;