perf evlist: Decode perf_event_attr->branch_sample_type
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 25 Apr 2016 19:45:29 +0000 (16:45 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 25 Apr 2016 19:48:01 +0000 (16:48 -0300)
commita213b92e15cc5019156594c8f3ae9170915aac9f
treeed26a8197a43d7f4658aadc2b7744cf31ab2e0dc
parent1df54290463e84b7b5eb26e5e6472167c3749901
perf evlist: Decode perf_event_attr->branch_sample_type

While trying to use --call-graph lbr in 'perf trace', since we only are
interested in the callchain for userspace, up to the callchain, I found
that 'perf evlist' is not decoding the branch_sample_type field, fix it.

Before:

  # perf record --call-graph lbr usleep 1
  # perf evlist -v
  cycles:ppp: size: 112, { sample_period, sample_freq }: 4000,
  sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD|BRANCH_STACK,
  disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1,
  precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1,
  comm_exec: 1, branch_sample_type: 51201
                ^^^^^^^^^^^^^^^^^^^^^^^^^

After:

  # perf evlist -v
  cycles:ppp: size: 112, { sample_period, sample_freq }: 4000,
  sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD|BRANCH_STACK,
  disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1,
  precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1,
  comm_exec: 1, branch_sample_type: USER|CALL_STACK|NO_FLAGS|NO_CYCLES
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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-hozai7974u0ulgx13k96fcaw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
This page took 0.052119 seconds and 5 git commands to generate.