[PATCH] perf timechart: Use tid not pid for COMM change

From: Arjan van de Ven
Date: Sat Jan 16 2010 - 15:51:30 EST


A process that changes its comm field, does this on a per kernel
task struct basis. The timechart tool used, incorrectly, the pid to track
this, and should have used the tid instead...

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
CC: stable@xxxxxxxxxx
---
tools/perf/builtin-timechart.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index a589a43..3f8bbcf 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -280,7 +280,7 @@ static u64 cpus_pstate_state[MAX_CPUS];

static int process_comm_event(event_t *event, struct perf_session *session __used)
{
- pid_set_comm(event->comm.pid, event->comm.comm);
+ pid_set_comm(event->comm.tid, event->comm.comm);
return 0;
}

--
1.6.2.5



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/