lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3@git.kernel.org>
Date:	Mon, 28 Feb 2011 08:23:12 GMT
From:	tip-bot for Thomas Renninger <trenn@...e.de>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	arjan@...ux.intel.com, acme@...stprotocols.net, trenn@...e.de,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/urgent] perf timechart: Fix max number of cpus

Commit-ID:  54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3
Gitweb:     http://git.kernel.org/tip/54b08f5f90feebc9756d96e0c7bf2fdffe4af7c3
Author:     Thomas Renninger <trenn@...e.de>
AuthorDate: Sun, 27 Feb 2011 22:36:46 +0100
Committer:  Ingo Molnar <mingo@...e.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@...e.de>
Cc: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: lenb@...nel.org
LKML-Reference: <1298842606-55712-6-git-send-email-trenn@...e.de>
Signed-off-by: Ingo Molnar <mingo@...e.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ