diff options
author | David Ahern <dsahern@gmail.com> | 2015-03-30 23:35:57 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-31 23:52:30 +0300 |
commit | 5aa0b030e8d29d6719c144818814b519cfcb105c (patch) | |
tree | 5558b3d391b99c78f2fe3003499815883a7536ba /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 73dbcd6537f0ef6bf98d84f8fd7f8ab9994c6cd8 (diff) | |
download | linux-5aa0b030e8d29d6719c144818814b519cfcb105c.tar.xz |
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>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions