mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf record: Add ability to sample call branches
This patch add a new branch type sampling filter to perf record. It is named 'call' and maps to PERF_SAMPLE_BRANCH_CALL. It samples direct call branches only, unlike 'any_call' which includes indirect calls as well. $ perf record -j call -e cycles ..... The man page is updated accordingly. Signed-off-by: Stephane Eranian <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
24f1a79a5f
commit
43e41adc9e
2 changed files with 2 additions and 0 deletions
|
|
@ -236,6 +236,7 @@ following filters are defined:
|
|||
- any_call: any function call or system call
|
||||
- any_ret: any function return or system call return
|
||||
- ind_call: any indirect branch
|
||||
- call: direct calls, including far (to/from kernel) calls
|
||||
- u: only when the branch target is at the user level
|
||||
- k: only when the branch target is in the kernel
|
||||
- hv: only when the target is at the hypervisor level
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ static const struct branch_mode branch_modes[] = {
|
|||
BRANCH_OPT("no_tx", PERF_SAMPLE_BRANCH_NO_TX),
|
||||
BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
|
||||
BRANCH_OPT("ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP),
|
||||
BRANCH_OPT("call", PERF_SAMPLE_BRANCH_CALL),
|
||||
BRANCH_END
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue