Re: [PATCH] perf tool: Fix ppid for synthesized fork events

From: David Ahern
Date: Wed Mar 25 2015 - 11:03:47 EST


On 3/25/15 7:24 AM, Arnaldo Carvalho de Melo wrote:
So it starts when there are tons of threads in the system, for which
synthezing from /proc will have to take place, without looking again at
that patch, I can't think about what would be a problem :-\

3 extra lines are read from /proc/pid/status:

Name: bash
State: S (sleeping)
Tgid: 6046

< current patch breaks here>

Ngid: 0
Pid: 6046
PPid: 6045

< my patch reads these 3 lines, repeats the memcmp and does an atoi on the PPid: value >

Let me remove that loop by reading in 4k at a time and making a single pass. That should bring down the overhead, but filling in the ppid will add some.

David

--
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/