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>] [day] [month] [year] [list]
Date:	Thu, 1 Apr 2010 13:04:46 -0700
From:	Andrew Isaacson <adi@...are.com>
To:	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] perf: timechart: handle pthreads correctly

pthreads applications have multiple processes with the same "pid" but
different "tid" values.  This confuses timechart, because it's using
the "pid" value to track processes.

Switch to using "tid" to avoid this confusion.  For non-pthreads
applications tid == pid so there's no downside.

Signed-off-by: Andy Isaacson <adi@...are.com>

---
I've attached a before.svg.gz and after.svg.gz showing the failure.

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 0d4d8ff..5b925de 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -286,7 +286,7 @@ static int process_comm_event(event_t *event, struct perf_session *session __use
 
 static int process_fork_event(event_t *event, struct perf_session *session __used)
 {
-	pid_fork(event->fork.pid, event->fork.ppid, event->fork.time);
+	pid_fork(event->fork.tid, event->fork.ppid, event->fork.time);
 	return 0;
 }
 

Download attachment "after.svg.gz" of type "application/octet-stream" (12447 bytes)

Download attachment "before.svg.gz" of type "application/octet-stream" (10731 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ