Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Don Zickus
On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: > Rather than parsing /proc/pid/status file one line at a time, read > it into a buffer in one shot and search for all strings in one pass. > > tgid conversion also simplified -- removing the isspace walk. As > noted by Arnaldo those

Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 31, 2015 at 04:35:46PM +0200, Jiri Olsa escreveu: > On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: > > Rather than parsing /proc/pid/status file one line at a time, read > > it into a buffer in one shot and search for all strings in one pass. > > > > tgid conversion also

Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Jiri Olsa
On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: > Rather than parsing /proc/pid/status file one line at a time, read > it into a buffer in one shot and search for all strings in one pass. > > tgid conversion also simplified -- removing the isspace walk. As > noted by Arnaldo those

Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Jiri Olsa
On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not

Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Don Zickus
On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not

Re: [PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-31 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 31, 2015 at 04:35:46PM +0200, Jiri Olsa escreveu: On Mon, Mar 30, 2015 at 02:35:57PM -0600, David Ahern wrote: Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also

[PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not needed for atoi == strtol calls. Signed-off-by: David Ahern Cc:

[PATCH v2 1/2] perf tool: Refactor comm/tgid lookup

2015-03-30 Thread David Ahern
Rather than parsing /proc/pid/status file one line at a time, read it into a buffer in one shot and search for all strings in one pass. tgid conversion also simplified -- removing the isspace walk. As noted by Arnaldo those are not needed for atoi == strtol calls. Signed-off-by: David Ahern