linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Mike Galbraith <efault@gmx.de>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stanislav Fomichev <stfomichev@yandex-team.ru>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 09/12] perf timechart: Move wake_events list to 'struct timechart'
Date: Mon,  2 Dec 2013 17:49:06 -0300	[thread overview]
Message-ID: <1386017349-24486-10-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1386017349-24486-1-git-send-email-acme@infradead.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

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>
---
 tools/perf/builtin-timechart.c | 10 +++++-----
 1 file 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 @@
 
 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;
-- 
1.8.1.4


  parent reply	other threads:[~2013-12-02 20:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 20:48 [GIT PULL 00/12] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-12-02 20:48 ` [PATCH 01/12] perf record: Unify data output code into perf_record__write function Arnaldo Carvalho de Melo
2013-12-02 20:48 ` [PATCH 02/12] perf tools: Use correct return type for readn function Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 03/12] perf tools: Fine tune " Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 04/12] perf tools: Add writen function Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 05/12] perf tools: Add perf_data_file__write interface Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 06/12] perf timechart: Introduce tool struct Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 07/12] perf timechart: Move all_data per_pid list to 'struct timechart' Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 08/12] perf timechart: Move power_events " Arnaldo Carvalho de Melo
2013-12-02 20:49 ` Arnaldo Carvalho de Melo [this message]
2013-12-02 20:49 ` [PATCH 10/12] perf tools: Correct the message in feature-libnuma checking Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 11/12] perf tools: Include test-stackprotector-all.c in test-all Arnaldo Carvalho de Melo
2013-12-02 20:49 ` [PATCH 12/12] perf trace: Honour -m option Arnaldo Carvalho de Melo
2013-12-04  9:18 ` [GIT PULL 00/12] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386017349-24486-10-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=stfomichev@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).