Messages in this thread | | | Date | Wed, 25 Mar 2015 09:03:38 -0600 | From | David Ahern <> | Subject | Re: [PATCH] perf tool: Fix ppid for synthesized fork events |
| |
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
| |