Commit 60f83fa6 authored by Jin Yao's avatar Jin Yao Committed by Arnaldo Carvalho de Melo

perf record: Create a new option save_type in --branch-filter

The option indicates the kernel to save branch type during sampling.

One example:

  perf record -g --branch-filter any,save_type <command>
Signed-off-by: default avatarYao Jin <yao.jin@linux.intel.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1500379995-6449-4-git-send-email-yao.jin@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d5c7f9dc
...@@ -332,6 +332,7 @@ following filters are defined: ...@@ -332,6 +332,7 @@ following filters are defined:
- no_tx: only when the target is not in a hardware transaction - no_tx: only when the target is not in a hardware transaction
- abort_tx: only when the target is a hardware transaction abort - abort_tx: only when the target is a hardware transaction abort
- cond: conditional branches - cond: conditional branches
- save_type: save branch type during sampling in case binary is not available later
+ +
The option requires at least one branch type among any, any_call, any_ret, ind_call, cond. The option requires at least one branch type among any, any_call, any_ret, ind_call, cond.
......
...@@ -28,6 +28,7 @@ static const struct branch_mode branch_modes[] = { ...@@ -28,6 +28,7 @@ static const struct branch_mode branch_modes[] = {
BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND), BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
BRANCH_OPT("ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP), BRANCH_OPT("ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP),
BRANCH_OPT("call", PERF_SAMPLE_BRANCH_CALL), BRANCH_OPT("call", PERF_SAMPLE_BRANCH_CALL),
BRANCH_OPT("save_type", PERF_SAMPLE_BRANCH_TYPE_SAVE),
BRANCH_END BRANCH_END
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment