perf kmem: Use perf_evsel__intval and perf_session__set_tracepoints_handlers
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Sep 2012 13:46:54 +0000 (10:46 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Sep 2012 13:52:03 +0000 (10:52 -0300)
commit0f7d2f1b65e3415854bbe842705f698a3350d7da
treec8fc00abf4c00460d4c4c29259e1555c8d5de352
parent14907e73830a256ad726a35a93789a9bc9595490
perf kmem: Use perf_evsel__intval and perf_session__set_tracepoints_handlers

Following the model of 'perf sched':

. raw_field_value searches first on the common fields, that are unused
  in this tool

. Using perf_session__set_tracepoints_handlers will save all those
  strcmp to find the right handler at sample processing time, do it just
  once and get the handler from evsel->handler.func.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kmem.c