From: tip-bot for Thomas Renninger <trenn@suse.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
arjan@linux.intel.com, acme@ghostprotocols.net, trenn@suse.de,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf timechart: Fix max number of cpus
Date: Mon, 28 Feb 2011 08:23:12 GMT [thread overview]
Message-ID: <tip-54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3@git.kernel.org> (raw)
In-Reply-To: <1298842606-55712-6-git-send-email-trenn@suse.de>
Commit-ID: 54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3
Gitweb: http://git.kernel.org/tip/54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3
Author: Thomas Renninger <trenn@suse.de>
AuthorDate: Sun, 27 Feb 2011 22:36:46 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 28 Feb 2011 08:56:15 +0100
perf timechart: Fix max number of cpus
Currently numcpus is determined in pid_put_sample which is only
called on sched_switch/sched_wakeup sample processing.
On a machine with a lot cpus I often saw the last cpu missing.
Check for (max) numcpus on every event happening and in the
beginning. -> fixes the issue for me.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: lenb@kernel.org
LKML-Reference: <1298842606-55712-6-git-send-email-trenn@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/builtin-timechart.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 746cf03..0ace786 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -264,9 +264,6 @@ pid_put_sample(int pid, int type, unsigned int cpu, u64 start, u64 end)
c->start_time = start;
if (p->start_time == 0 || p->start_time > start)
p->start_time = start;
-
- if (cpu > numcpus)
- numcpus = cpu;
}
#define MAX_CPUS 4096
@@ -511,6 +508,9 @@ static int process_sample_event(event_t *event __used,
if (!event_str)
return 0;
+ if (sample->cpu > numcpus)
+ numcpus = sample->cpu;
+
if (strcmp(event_str, "power:cpu_idle") == 0) {
struct power_processor_entry *ppe = (void *)te;
if (ppe->state == (u32)PWR_EVENT_EXIT)
next prev parent reply other threads:[~2011-02-28 8:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-27 21:36 [PATCH] Several riskless, tiny fixes Thomas Renninger
2011-02-27 21:36 ` [PATCH] shmobile: Rename cpuidle states to fit to general conventions Thomas Renninger
2011-03-11 3:40 ` Paul Mundt
2011-02-27 21:36 ` [PATCH] intel_idle: Rename cpuidle states Thomas Renninger
2011-02-28 16:04 ` Len Brown
2011-02-27 21:36 ` [PATCH] pm_qos: Make pm_qos settings readable Thomas Renninger
2011-02-28 21:08 ` Rafael J. Wysocki
2011-02-27 21:36 ` [PATCH] perf: timechart: fix black idle boxes in the title Thomas Renninger
2011-02-28 8:22 ` [tip:perf/urgent] perf timechart: Fix " tip-bot for Thomas Renninger
2011-02-27 21:36 ` [PATCH] perf: timechart -> fix max number of cpus Thomas Renninger
2011-02-28 8:23 ` tip-bot for Thomas Renninger [this message]
2011-02-28 7:54 ` [PATCH] Several riskless, tiny fixes Ingo Molnar
2011-02-28 20:43 ` Rafael J. Wysocki
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=tip-54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3@git.kernel.org \
--to=trenn@suse.de \
--cc=acme@ghostprotocols.net \
--cc=arjan@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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