]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Refactor comm/tgid lookup
authorDavid Ahern <dsahern@gmail.com>
Mon, 30 Mar 2015 20:35:57 +0000 (14:35 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Mar 2015 20:52:30 +0000 (17:52 -0300)
commit377dba9d4fe31d61b75f6342cec028a2f90d77cf
tree5558b3d391b99c78f2fe3003499815883a7536ba
parent734a70d3af95d3ddc82206a458683230f4b9be03
perf tools: Refactor comm/tgid lookup

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 <dsahern@gmail.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Mario <jmario@redhat.com>
Link: http://lkml.kernel.org/r/1427747758-18510-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c