linux-kernel-test/tools/perf
Adrian Hunter bc9b6bf07c perf tools: Add Intel PT support for PSB periods
The PSB packet is a synchronization packet that provides a starting
point for decoding or recovery from errors.

This patch adds support for a new Intel PT feature that allows the
frequency of PSB packets to be specified.

Support for this feature is indicated by
/sys/bus/event_source/devices/intel_pt/caps/psb_cyc which contains "1"
if the feature is supported and "0" otherwise.

The PSB period can be specified as a PMU config term e.g. perf record -e
intel_pt/psb_period=2/u sleep 1

The default value is 3 or the nearest lower value that is supported.  0
is always supported.

Valid values are given by:

/sys/bus/event_source/devices/intel_pt/caps/psb_periods

which contains a hexadecimal value, the bits of which represent valid
values e.g. bit 2 set means value 2 is valid.

The value is converted to the approximate number of trace bytes between
PSB packets as:

	2 ^ (value + 11)

e.g. value 3 means 16KiB bytes between PSBs

If an invalid value is entered, the error message will give a list of
valid values e.g.

	$ perf record -e intel_pt/psb_period=15/u uname
	Invalid psb_period for intel_pt. Valid values are: 0-5

tools/perf/Documentation/intel-pt.txt is updated in a later patch as
there are a number of new features being added.

For more information about PSB periods refer to the Intel 64 and IA-32
Architectures SDM Chapter 36 Intel Processor Trace from June 2015 or
later.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1437150840-31811-18-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-08-24 17:45:08 -03:00
..
arch perf tools: Add Intel PT support for PSB periods 2015-08-24 17:45:08 -03:00
bench perf bench futex: Add lock_pi stresser 2015-07-20 17:49:51 -03:00
config perf tools: Support static linking with libdw 2015-08-13 14:49:11 -03:00
Documentation perf tools: Put itrace options into an asciidoc include 2015-08-21 11:40:44 -03:00
python perf python: Make twatch.py use soft dummy event, freq=0 2015-07-29 10:51:45 -03:00
scripts perf tools: Add example call-graph script 2015-08-21 12:32:40 -03:00
tests perf tests: Add tests to callgraph and time parse 2015-08-12 13:20:29 -03:00
trace/strace/groups perf trace: Support 'strace' syscall event groups 2015-07-20 15:16:32 -03:00
ui perf ui tui progress: Implement the ui_progress_ops->finish() method 2015-08-24 16:18:26 -03:00
util perf tools: Fix Intel PT 'instructions' sample period 2015-08-24 17:42:26 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build perf trace: Support 'strace' syscall event groups 2015-07-20 15:16:32 -03:00
builtin-annotate.c perf annotate: Reset the dso find_symbol cache when removing symbols 2015-08-24 13:33:14 -03:00
builtin-bench.c perf bench futex: Add lock_pi stresser 2015-07-20 17:49:51 -03:00
builtin-buildid-cache.c perf buildid: Use SBUILD_ID_SIZE macro 2015-07-20 17:49:50 -03:00
builtin-buildid-list.c perf buildid: Use SBUILD_ID_SIZE macro 2015-07-20 17:49:50 -03:00
builtin-data.c perf data: Support using -f to override perf.data file ownership for 'convert' 2015-04-02 13:18:52 -03:00
builtin-diff.c perf callchain: Allow disabling call graphs per event 2015-08-12 13:20:28 -03:00
builtin-evlist.c perf evlist: Support using -f to override perf.data file ownership 2015-04-02 13:18:45 -03:00
builtin-help.c
builtin-inject.c perf tools: Add new PERF_RECORD_SWITCH event 2015-07-23 22:51:13 -03:00
builtin-kmem.c perf kmem: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-kvm.c perf kvm: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-list.c
builtin-lock.c perf machine: Protect the machine->threads with a rwlock 2015-05-08 16:19:27 -03:00
builtin-mem.c perf mem: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-probe.c perf probe: Delete an unnecessary check before the function call "strfilter__delete" 2015-07-06 08:58:36 -03:00
builtin-record.c Merge branch 'perf/urgent' into perf/core, to pick up fixes before adding more changes 2015-08-20 11:48:56 +02:00
builtin-report.c perf report: Show call graph from reference events 2015-08-12 13:20:28 -03:00
builtin-sched.c perf sched: Add option to merge like comms to lat output 2015-05-27 12:21:45 -03:00
builtin-script.c perf script: Initialize callchain_param.record_mode 2015-08-17 10:48:39 -03:00
builtin-stat.c perf stat: Move perf_counts struct and functions into separate object 2015-08-08 14:16:49 -03:00
builtin-timechart.c perf tools: Elliminate alignment holes 2015-05-18 10:17:33 -03:00
builtin-top.c Merge branch 'perf/urgent' into perf/core, to pick up fixes before adding more changes 2015-08-20 11:48:56 +02:00
builtin-trace.c perf trace: Move vfs_getname storage to per thread area 2015-08-14 13:16:27 -03:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile perf build: Fix single target build dependency check 2015-06-22 11:27:09 -03:00
Makefile.perf perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
MANIFEST perf tests: Add LLVM test for eBPF on-the-fly compiling 2015-08-07 10:57:24 -03:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c
perf.h perf tools: Introduce callgraph_set for callgraph option 2015-07-29 16:18:45 -03:00