aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation
diff options
context:
space:
mode:
authorRoberto Agostino Vitillo <ravitillo@lbl.gov>2012-02-09 17:21:02 -0500
committerIngo Molnar <mingo@elte.hu>2012-03-09 02:26:05 -0500
commitbdfebd848f2a14e639031a0b0e61d7c7ee5e5fd2 (patch)
tree8ebcc7afda6b506dcd22d44bccdbd925c02b6768 /tools/perf/Documentation
parentb5387528f31d98acedf06e930554b563d87e2383 (diff)
perf record: Add support for sampling taken branch
This patch adds a new option to enable taken branch stack sampling, i.e., leverage the PERF_SAMPLE_BRANCH_STACK feature of perf_events. There is a new option to active this mode: -b. It is possible to pass a set of filters to select the type of branches to sample. The following filters are available: - any : any type of branches - any_call : any function call or system call - any_ret : any function return or system call return - any_ind : any indirect branch - 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 branch target is in the hypervisor Filters can be combined by passing a comma separated list to the option: $ perf record -b any_call,u -e cycles:u branchy Signed-off-by: Roberto Agostino Vitillo <ravitillo@lbl.gov> Signed-off-by: Stephane Eranian <eranian@google.com> Cc: peterz@infradead.org Cc: acme@redhat.com Cc: robert.richter@amd.com Cc: ming.m.lin@intel.com Cc: andi@firstfloor.org Cc: asharma@fb.com Cc: vweaver1@eecs.utk.edu Cc: khandual@linux.vnet.ibm.com Cc: dsahern@gmail.com Link: http://lkml.kernel.org/r/1328826068-11713-13-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Documentation')
-rw-r--r--tools/perf/Documentation/perf-record.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index a5766b4b0125..60bddaf0e5bd 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -152,6 +152,31 @@ an empty cgroup (monitor all the time) using, e.g., -G foo,,bar. Cgroups must ha
152corresponding events, i.e., they always refer to events defined earlier on the command 152corresponding events, i.e., they always refer to events defined earlier on the command
153line. 153line.
154 154
155-b::
156--branch-stack::
157Enable taken branch stack sampling. Each sample captures a series of consecutive
158taken branches. The number of branches captured with each sample depends on the
159underlying hardware, the type of branches of interest, and the executed code.
160It is possible to select the types of branches captured by enabling filters. The
161following filters are defined:
162
163 - any : any type of branches
164 - any_call: any function call or system call
165 - any_ret: any function return or system call return
166 - any_ind: any indirect branch
167 - u: only when the branch target is at the user level
168 - k: only when the branch target is in the kernel
169 - hv: only when the target is at the hypervisor level
170
171+
172At least one of any, any_call, any_ret, any_ind must be provided. The privilege levels may
173be ommitted, in which case, the privilege levels of the associated event are applied to the
174branch filter. Both kernel (k) and hypervisor (hv) privilege levels are subject to
175permissions. When sampling on multiple events, branch stack sampling is enabled for all
176the sampling events. The sampled branch type is the same for all events.
177Note that taken branch sampling may not be available on all processors.
178The various filters must be specified as a comma separated list: -b any_ret,u,k
179
155SEE ALSO 180SEE ALSO
156-------- 181--------
157linkperf:perf-stat[1], linkperf:perf-list[1] 182linkperf:perf-stat[1], linkperf:perf-list[1]