perf evsel: Provide way to extract integer value from format_field
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 May 2016 15:47:46 +0000 (12:47 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Jun 2016 17:53:46 +0000 (14:53 -0300)
commit90525176d71995ffde2d0c532f2758304c666a08
tree2bc23be3cf88b2f401e685d737e768013da59701
parent030ba6cd105c68ce919c5e239853b567490cd059
perf evsel: Provide way to extract integer value from format_field

Out of perf_evsel__intval(), that requires passing the variable name,
that will then be searched in the list of tracepoint variables for the
given evsel.

In cases such as syscall file descriptor ("fd") tracking, this is
wasteful, we need just to use perf_evsel__field() and cache the
format_field.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-r6f89jx9j5nkx037d0naviqy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h