Messages in this thread | | | Date | Wed, 25 Mar 2015 13:55:44 -0600 | From | David Ahern <> | Subject | Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events |
| |
On 3/25/15 1:15 PM, Don Zickus wrote: > On Wed, Mar 25, 2015 at 10:51:10AM -0600, David Ahern wrote: >> 363b785f38 added synthesized fork events and set a thread's parent id >> to itself. Since we are already processing /proc/<pid>/status the ppid >> can be determined properly. Make it so. >> >> Performance impact measured on a sparc based T5-8 (1024 CPUs): >> $ ps -efL | wc -l >> 20185 >> >> Current code: >> $ time perf record -o perf-no-ppid.data -e cpu-clock -F 1000 -a -v -BN -- usleep 1 >> mmap size 532480B >> [ perf record: Woken up 0 times to write data ] >> failed to write feature 9 >> [ perf record: Captured and wrote 0.000 MB perf-no-ppid.data ] >> >> real 0m26.144s >> user 0m0.452s >> sys 0m25.564s >> >> With PPID patch: >> $ time ./perf_ppid record -o perf-ppid.data -e cpu-clock -F 1000 -a -v -BN -- usleep 1 >> mmap size 532480B >> [ perf record: Woken up 0 times to write data ] >> failed to write feature 9 >> [ perf record: Captured and wrote 0.000 MB perf-ppid.data ] >> >> real 0m25.743s >> user 0m0.268s >> sys 0m25.368s >> >> Signed-off-by: David Ahern <dsahern@gmail.com> >> Cc: Don Zickus <dzickus@redhat.com> >> Cc: Joe Mario <jmario@redhat.com> >> Cc: Jiri Olsa <jolsa@redhat.com> >> --- >> v2: >> - removed loop in place of 1 read and processing a buffer > > Hmm, I am not entirely sure this is correct. You made an optimization that > hides the negative impact your patch does. I would prefer you split this > patch into two pieces. One with the read loop optimization (which I think > is great) and the second is your ppid change. > > I would then like to redo our test with the first patch applied and then > both patches applied. >
From your other response I take it you understand the patch now? It is a matter of semantics to break this single into 2 -- optimize the existing code and then add the ppid. End result will be what this patch shows. Before I do that can you /Joe confirm the performance is acceptable?
Thanks,
| |