Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf intel-pt: Update documentation to include new ptwrite and power events

Update documentation to include new ptwrite and power events.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1495786658-18063-36-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
ead2bfdb cc892720

+40 -2
+40 -2
tools/perf/Documentation/intel-pt.txt
··· 108 108 script export-to-postgresql.py for more details, and to script 109 109 call-graph-from-postgresql.py for an example of using the database. 110 110 111 + There is also script intel-pt-events.py which provides an example of how to 112 + unpack the raw data for power events and PTWRITE. 113 + 111 114 As mentioned above, it is easy to capture too much data. One way to limit the 112 115 data captured is to use 'snapshot' mode which is explained further below. 113 116 Refer to 'new snapshot option' and 'Intel PT modes of operation' further below. ··· 713 710 714 711 which, in turn, is the same as 715 712 716 - --itrace=ibxe 713 + --itrace=ibxwpe 717 714 718 715 The letters are: 719 716 720 717 i synthesize "instructions" events 721 718 b synthesize "branches" events 722 719 x synthesize "transactions" events 720 + w synthesize "ptwrite" events 721 + p synthesize "power" events 723 722 c synthesize branches events (calls only) 724 723 r synthesize branches events (returns only) 725 724 e synthesize tracing error events ··· 740 735 'flags' field can be used in perf script to determine whether the event is a 741 736 tranasaction start, commit or abort. 742 737 743 - Error events are new. They show where the decoder lost the trace. Error events 738 + Note that "instructions", "branches" and "transactions" events depend on code 739 + flow packets which can be disabled by using the config term "branch=0". Refer 740 + to the config terms section above. 741 + 742 + "ptwrite" events record the payload of the ptwrite instruction and whether 743 + "fup_on_ptw" was used. "ptwrite" events depend on PTWRITE packets which are 744 + recorded only if the "ptw" config term was used. Refer to the config terms 745 + section above. perf script "synth" field displays "ptwrite" information like 746 + this: "ip: 0 payload: 0x123456789abcdef0" where "ip" is 1 if "fup_on_ptw" was 747 + used. 748 + 749 + "Power" events correspond to power event packets and CBR (core-to-bus ratio) 750 + packets. While CBR packets are always recorded when tracing is enabled, power 751 + event packets are recorded only if the "pwr_evt" config term was used. Refer to 752 + the config terms section above. The power events record information about 753 + C-state changes, whereas CBR is indicative of CPU frequency. perf script 754 + "event,synth" fields display information like this: 755 + cbr: cbr: 22 freq: 2189 MHz (200%) 756 + mwait: hints: 0x60 extensions: 0x1 757 + pwre: hw: 0 cstate: 2 sub-cstate: 0 758 + exstop: ip: 1 759 + pwrx: deepest cstate: 2 last cstate: 2 wake reason: 0x4 760 + Where: 761 + "cbr" includes the frequency and the percentage of maximum non-turbo 762 + "mwait" shows mwait hints and extensions 763 + "pwre" shows C-state transitions (to a C-state deeper than C0) and 764 + whether initiated by hardware 765 + "exstop" indicates execution stopped and whether the IP was recorded 766 + exactly, 767 + "pwrx" indicates return to C0 768 + For more details refer to the Intel 64 and IA-32 Architectures Software 769 + Developer Manuals. 770 + 771 + Error events show where the decoder lost the trace. Error events 744 772 are quite important. Users must know if what they are seeing is a complete 745 773 picture or not. 746 774