diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2017-05-26 04:17:36 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-06-30 10:50:54 -0400 |
| commit | ead2bfdb85ab311bc3e1c2e55bff207aafaab096 (patch) | |
| tree | 2b1b7362943bbc663868eddf651505a6fe4e8ee4 | |
| parent | cc892720d85a31cc04f4c01c03d88a0eb3c437fa (diff) | |
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>
| -rw-r--r-- | tools/perf/Documentation/intel-pt.txt | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/tools/perf/Documentation/intel-pt.txt b/tools/perf/Documentation/intel-pt.txt index d157dee7a4ec..4b6cdbf8f935 100644 --- a/tools/perf/Documentation/intel-pt.txt +++ b/tools/perf/Documentation/intel-pt.txt | |||
| @@ -108,6 +108,9 @@ approach is available to export the data to a postgresql database. Refer to | |||
| 108 | script export-to-postgresql.py for more details, and to script | 108 | script export-to-postgresql.py for more details, and to script |
| 109 | call-graph-from-postgresql.py for an example of using the database. | 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 | As mentioned above, it is easy to capture too much data. One way to limit the | 114 | As mentioned above, it is easy to capture too much data. One way to limit the |
| 112 | data captured is to use 'snapshot' mode which is explained further below. | 115 | data captured is to use 'snapshot' mode which is explained further below. |
| 113 | Refer to 'new snapshot option' and 'Intel PT modes of operation' further below. | 116 | Refer to 'new snapshot option' and 'Intel PT modes of operation' further below. |
| @@ -710,13 +713,15 @@ Having no option is the same as | |||
| 710 | 713 | ||
| 711 | which, in turn, is the same as | 714 | which, in turn, is the same as |
| 712 | 715 | ||
| 713 | --itrace=ibxe | 716 | --itrace=ibxwpe |
| 714 | 717 | ||
| 715 | The letters are: | 718 | The letters are: |
| 716 | 719 | ||
| 717 | i synthesize "instructions" events | 720 | i synthesize "instructions" events |
| 718 | b synthesize "branches" events | 721 | b synthesize "branches" events |
| 719 | x synthesize "transactions" events | 722 | x synthesize "transactions" events |
| 723 | w synthesize "ptwrite" events | ||
| 724 | p synthesize "power" events | ||
| 720 | c synthesize branches events (calls only) | 725 | c synthesize branches events (calls only) |
| 721 | r synthesize branches events (returns only) | 726 | r synthesize branches events (returns only) |
| 722 | e synthesize tracing error events | 727 | e synthesize tracing error events |
| @@ -735,7 +740,40 @@ and "r" can be combined to get calls and returns. | |||
| 735 | 'flags' field can be used in perf script to determine whether the event is a | 740 | 'flags' field can be used in perf script to determine whether the event is a |
| 736 | tranasaction start, commit or abort. | 741 | tranasaction start, commit or abort. |
| 737 | 742 | ||
| 738 | Error events are new. They show where the decoder lost the trace. Error events | 743 | Note that "instructions", "branches" and "transactions" events depend on code |
| 744 | flow packets which can be disabled by using the config term "branch=0". Refer | ||
| 745 | to the config terms section above. | ||
| 746 | |||
| 747 | "ptwrite" events record the payload of the ptwrite instruction and whether | ||
| 748 | "fup_on_ptw" was used. "ptwrite" events depend on PTWRITE packets which are | ||
| 749 | recorded only if the "ptw" config term was used. Refer to the config terms | ||
| 750 | section above. perf script "synth" field displays "ptwrite" information like | ||
| 751 | this: "ip: 0 payload: 0x123456789abcdef0" where "ip" is 1 if "fup_on_ptw" was | ||
| 752 | used. | ||
| 753 | |||
| 754 | "Power" events correspond to power event packets and CBR (core-to-bus ratio) | ||
| 755 | packets. While CBR packets are always recorded when tracing is enabled, power | ||
| 756 | event packets are recorded only if the "pwr_evt" config term was used. Refer to | ||
| 757 | the config terms section above. The power events record information about | ||
| 758 | C-state changes, whereas CBR is indicative of CPU frequency. perf script | ||
| 759 | "event,synth" fields display information like this: | ||
| 760 | cbr: cbr: 22 freq: 2189 MHz (200%) | ||
| 761 | mwait: hints: 0x60 extensions: 0x1 | ||
| 762 | pwre: hw: 0 cstate: 2 sub-cstate: 0 | ||
| 763 | exstop: ip: 1 | ||
| 764 | pwrx: deepest cstate: 2 last cstate: 2 wake reason: 0x4 | ||
| 765 | Where: | ||
| 766 | "cbr" includes the frequency and the percentage of maximum non-turbo | ||
| 767 | "mwait" shows mwait hints and extensions | ||
| 768 | "pwre" shows C-state transitions (to a C-state deeper than C0) and | ||
| 769 | whether initiated by hardware | ||
| 770 | "exstop" indicates execution stopped and whether the IP was recorded | ||
| 771 | exactly, | ||
| 772 | "pwrx" indicates return to C0 | ||
| 773 | For more details refer to the Intel 64 and IA-32 Architectures Software | ||
| 774 | Developer Manuals. | ||
| 775 | |||
| 776 | Error events show where the decoder lost the trace. Error events | ||
| 739 | are quite important. Users must know if what they are seeing is a complete | 777 | are quite important. Users must know if what they are seeing is a complete |
| 740 | picture or not. | 778 | picture or not. |
| 741 | 779 | ||
