1. 18 6月, 2019 10 次提交
    • A
      perf intel-pt: Add XMM registers to synthesized PEBS sample · 143d34a6
      Adrian Hunter 提交于
      Add XMM register information from PEBS data in the Intel PT trace to the
      synthesized PEBS sample.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-9-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      143d34a6
    • A
      perf intel-pt: Add gp registers to synthesized PEBS sample · 9e9a618a
      Adrian Hunter 提交于
      Add general purpose register information from PEBS data in the Intel PT
      trace to the synthesized PEBS sample.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-8-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9e9a618a
    • A
      perf intel-pt: Synthesize PEBS sample basic information · 9d0bc53e
      Adrian Hunter 提交于
      Synthesize a PEBS sample using basic information (ip, timestamp) only.
      Other PEBS information will be added in later patches.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-7-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9d0bc53e
    • A
      perf intel-pt: Factor out common sample preparation for re-use · 0dfded34
      Adrian Hunter 提交于
      Factor out common sample preparation for re-use when synthesizing PEBS
      samples.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-6-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0dfded34
    • A
      perf intel-pt: Prepare to synthesize PEBS samples · e62ca655
      Adrian Hunter 提交于
      Add infrastructure to prepare for synthesizing PEBS samples but leave
      the actual synthesis to later patches.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-5-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e62ca655
    • A
      perf intel-pt: Add decoder support for PEBS via PT · 4c35595e
      Adrian Hunter 提交于
      PEBS data is encoded in Block Item Packets (BIP). Populate a new structure
      intel_pt_blk_items with the values and, upon a Block End Packet (BEP),
      report them as a new Intel PT sample type INTEL_PT_BLK_ITEMS.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-4-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4c35595e
    • A
      perf intel-pt: Add Intel PT packet decoder test · a0db77bf
      Adrian Hunter 提交于
      Add Intel PT packet decoder test. This test feeds byte sequences to the
      Intel PT packet decoder and checks the results. Changes to the packet
      context are also checked.
      
      Committer testing:
      
        # perf test "Intel PT"
        65: Intel PT packet decoder                               : Ok
        # perf test -v "Intel PT"
        65: Intel PT packet decoder                               :
        --- start ---
        test child forked, pid 6360
        Decoded ok: 00                                                PAD
        Decoded ok: 04                                                TNT N (1)
        Decoded ok: 06                                                TNT T (1)
        Decoded ok: 80                                                TNT NNNNNN (6)
        Decoded ok: fe                                                TNT TTTTTT (6)
        Decoded ok: 02 a3 02 00 00 00 00 00                           TNT N (1)
        Decoded ok: 02 a3 03 00 00 00 00 00                           TNT T (1)
        Decoded ok: 02 a3 00 00 00 00 00 80                           TNT NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN (47)
        Decoded ok: 02 a3 ff ff ff ff ff ff                           TNT TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT (47)
        Decoded ok: 0d                                                TIP no ip
        Decoded ok: 2d 01 02                                          TIP 0x201
        Decoded ok: 4d 01 02 03 04                                    TIP 0x4030201
        Decoded ok: 6d 01 02 03 04 05 06                              TIP 0x60504030201
        Decoded ok: 8d 01 02 03 04 05 06                              TIP 0x60504030201
        Decoded ok: cd 01 02 03 04 05 06 07 08                        TIP 0x807060504030201
        Decoded ok: 11                                                TIP.PGE no ip
        Decoded ok: 31 01 02                                          TIP.PGE 0x201
        Decoded ok: 51 01 02 03 04                                    TIP.PGE 0x4030201
        Decoded ok: 71 01 02 03 04 05 06                              TIP.PGE 0x60504030201
        Decoded ok: 91 01 02 03 04 05 06                              TIP.PGE 0x60504030201
        Decoded ok: d1 01 02 03 04 05 06 07 08                        TIP.PGE 0x807060504030201
        Decoded ok: 01                                                TIP.PGD no ip
        Decoded ok: 21 01 02                                          TIP.PGD 0x201
        Decoded ok: 41 01 02 03 04                                    TIP.PGD 0x4030201
        Decoded ok: 61 01 02 03 04 05 06                              TIP.PGD 0x60504030201
        Decoded ok: 81 01 02 03 04 05 06                              TIP.PGD 0x60504030201
        Decoded ok: c1 01 02 03 04 05 06 07 08                        TIP.PGD 0x807060504030201
        Decoded ok: 1d                                                FUP no ip
        Decoded ok: 3d 01 02                                          FUP 0x201
        Decoded ok: 5d 01 02 03 04                                    FUP 0x4030201
        Decoded ok: 7d 01 02 03 04 05 06                              FUP 0x60504030201
        Decoded ok: 9d 01 02 03 04 05 06                              FUP 0x60504030201
        Decoded ok: dd 01 02 03 04 05 06 07 08                        FUP 0x807060504030201
        Decoded ok: 02 43 02 04 06 08 0a 0c                           PIP 0x60504030201 (NR=0)
        Decoded ok: 02 43 03 04 06 08 0a 0c                           PIP 0x60504030201 (NR=1)
        Decoded ok: 99 00                                             MODE.Exec 16
        Decoded ok: 99 01                                             MODE.Exec 64
        Decoded ok: 99 02                                             MODE.Exec 32
        Decoded ok: 99 20                                             MODE.TSX TXAbort:0 InTX:0
        Decoded ok: 99 21                                             MODE.TSX TXAbort:0 InTX:1
        Decoded ok: 99 22                                             MODE.TSX TXAbort:1 InTX:0
        Decoded ok: 02 83                                             TraceSTOP
        Decoded ok: 02 03 12 00                                       CBR 0x12
        Decoded ok: 19 01 02 03 04 05 06 07                           TSC 0x7060504030201
        Decoded ok: 59 12                                             MTC 0x12
        Decoded ok: 02 73 00 00 00 00 00                              TMA CTC 0x0 FC 0x0
        Decoded ok: 02 73 01 02 00 00 00                              TMA CTC 0x201 FC 0x0
        Decoded ok: 02 73 00 00 00 ff 01                              TMA CTC 0x0 FC 0x1ff
        Decoded ok: 02 73 80 c0 00 ff 01                              TMA CTC 0xc080 FC 0x1ff
        Decoded ok: 03                                                CYC 0x0
        Decoded ok: 0b                                                CYC 0x1
        Decoded ok: fb                                                CYC 0x1f
        Decoded ok: 07 02                                             CYC 0x20
        Decoded ok: ff fe                                             CYC 0xfff
        Decoded ok: 07 01 02                                          CYC 0x1000
        Decoded ok: ff ff fe                                          CYC 0x7ffff
        Decoded ok: 07 01 01 02                                       CYC 0x80000
        Decoded ok: ff ff ff fe                                       CYC 0x3ffffff
        Decoded ok: 07 01 01 01 02                                    CYC 0x4000000
        Decoded ok: ff ff ff ff fe                                    CYC 0x1ffffffff
        Decoded ok: 07 01 01 01 01 02                                 CYC 0x200000000
        Decoded ok: ff ff ff ff ff fe                                 CYC 0xffffffffff
        Decoded ok: 07 01 01 01 01 01 02                              CYC 0x10000000000
        Decoded ok: ff ff ff ff ff ff fe                              CYC 0x7fffffffffff
        Decoded ok: 07 01 01 01 01 01 01 02                           CYC 0x800000000000
        Decoded ok: ff ff ff ff ff ff ff fe                           CYC 0x3fffffffffffff
        Decoded ok: 07 01 01 01 01 01 01 01 02                        CYC 0x40000000000000
        Decoded ok: ff ff ff ff ff ff ff ff fe                        CYC 0x1fffffffffffffff
        Decoded ok: 07 01 01 01 01 01 01 01 01 02                     CYC 0x2000000000000000
        Decoded ok: ff ff ff ff ff ff ff ff ff 0e                     CYC 0xffffffffffffffff
        Decoded ok: 02 c8 01 02 03 04 05                              VMCS 0x504030201
        Decoded ok: 02 f3                                             OVF
        Decoded ok: 02 f3                                             OVF
        Decoded ok: 02 f3                                             OVF
        Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82   PSB
        Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82   PSB
        Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82   PSB
        Decoded ok: 02 23                                             PSBEND
        Decoded ok: 02 c3 88 01 02 03 04 05 06 07 00                  MNT 0x7060504030201
        Decoded ok: 02 12 01 02 03 04                                 PTWRITE 0x4030201 IP:0
        Decoded ok: 02 32 01 02 03 04 05 06 07 08                     PTWRITE 0x807060504030201 IP:0
        Decoded ok: 02 92 01 02 03 04                                 PTWRITE 0x4030201 IP:1
        Decoded ok: 02 b2 01 02 03 04 05 06 07 08                     PTWRITE 0x807060504030201 IP:1
        Decoded ok: 02 62                                             EXSTOP IP:0
        Decoded ok: 02 e2                                             EXSTOP IP:1
        Decoded ok: 02 c2 00 00 00 00 00 00 00 00                     MWAIT 0x0 Hints 0x0 Extensions 0x0
        Decoded ok: 02 c2 01 02 03 04 05 06 07 08                     MWAIT 0x807060504030201 Hints 0x1 Extensions 0x1
        Decoded ok: 02 c2 ff 02 03 04 07 06 07 08                     MWAIT 0x8070607040302ff Hints 0xff Extensions 0x3
        Decoded ok: 02 22 00 00                                       PWRE 0x0 HW:0 CState:0 Sub-CState:0
        Decoded ok: 02 22 01 02                                       PWRE 0x201 HW:0 CState:0 Sub-CState:2
        Decoded ok: 02 22 80 34                                       PWRE 0x3480 HW:1 CState:3 Sub-CState:4
        Decoded ok: 02 22 00 56                                       PWRE 0x5600 HW:0 CState:5 Sub-CState:6
        Decoded ok: 02 a2 00 00 00 00 00                              PWRX 0x0 Last CState:0 Deepest CState:0 Wake Reason 0x0
        Decoded ok: 02 a2 01 02 03 04 05                              PWRX 0x504030201 Last CState:0 Deepest CState:1 Wake Reason 0x2
        Decoded ok: 02 a2 ff ff ff ff ff                              PWRX 0xffffffffff Last CState:15 Deepest CState:15 Wake Reason 0xf
        Decoded ok: 02 63 00                                          BBP SZ 8-byte Type 0x0
        Decoded ok: 02 63 80                                          BBP SZ 4-byte Type 0x0
        Decoded ok: 02 63 1f                                          BBP SZ 8-byte Type 0x1f
        Decoded ok: 02 63 9f                                          BBP SZ 4-byte Type 0x1f
        Decoded ok: 04 00 00 00 00                                    BIP ID 0x00 Value 0x0
        Decoded ok: fc 00 00 00 00                                    BIP ID 0x1f Value 0x0
        Decoded ok: 04 01 02 03 04                                    BIP ID 0x00 Value 0x4030201
        Decoded ok: fc 01 02 03 04                                    BIP ID 0x1f Value 0x4030201
        Decoded ok: 04 00 00 00 00 00 00 00 00                        BIP ID 0x00 Value 0x0
        Decoded ok: fc 00 00 00 00 00 00 00 00                        BIP ID 0x1f Value 0x0
        Decoded ok: 04 01 02 03 04 05 06 07 08                        BIP ID 0x00 Value 0x807060504030201
        Decoded ok: fc 01 02 03 04 05 06 07 08                        BIP ID 0x1f Value 0x807060504030201
        Decoded ok: 02 33                                             BEP IP:0
        Decoded ok: 02 b3                                             BEP IP:1
        Decoded ok: 02 33                                             BEP IP:0
        Decoded ok: 02 b3                                             BEP IP:1
        test child finished with 0
        ---- end ----
        Intel PT packet decoder: Ok
        #
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-3-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a0db77bf
    • A
      perf intel-pt: Add new packets for PEBS via PT · edff7809
      Adrian Hunter 提交于
      Add 3 new packets to supports PEBS via PT, namely Block Begin Packet
      (BBP), Block Item Packet (BIP) and Block End Packet (BEP). PEBS data is
      encoded into multiple BIP packets that come between BBP and BEP. The BEP
      packet might be associated with a FUP packet. That is indicated by using
      a separate packet type (INTEL_PT_BEP_IP) similar to other packets types
      with the _IP suffix.
      
      Refer to the Intel SDM for more information about PEBS via PT:
      
        https://software.intel.com/en-us/articles/intel-sdm
        May 2019 version: Vol. 3B 18.5.5.2 PEBS output to Intel® Processor Trace
      
      Decoding of BIP packets conflicts with single-byte TNT packets. Since
      BIP packets only occur in the context of a block (i.e. between BBP and
      BEP), that context must be recorded and passed to the packet decoder.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20190610072803.10456-2-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      edff7809
    • M
      perf: cs-etm: Optimize option setup for CPU-wide sessions · 374d910f
      Mathieu Poirier 提交于
      Call function cs_etm_set_option() once with all relevant options set
      rather than multiple times to avoid going through the list of CPU more
      than once.
      Suggested-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/20190611204528.20093-1-mathieu.poirier@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      374d910f
    • R
      perf tests arm64: Compile tests unconditionally · 010e3e8f
      Raphael Gault 提交于
      In order to subsequently add more tests for the arm64 architecture we
      compile the tests target for arm64 systematically.
      
      Further explanation provided by Mark Rutland:
      
      Given prior questions regarding this commit, it's probably worth
      spelling things out more explicitly, e.g.
      
        Currently we only build the arm64/tests directory if
        CONFIG_DWARF_UNWIND is selected, which is fine as the only test we
        have is arm64/tests/dwarf-unwind.o.
      
        So that we can add more tests to the test directory, let's
        unconditionally build the directory, but conditionally build
        dwarf-unwind.o depending on CONFIG_DWARF_UNWIND.
      
        There should be no functional change as a result of this patch.
      Signed-off-by: NRaphael Gault <raphael.gault@arm.com>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/20190611125315.18736-2-raphael.gault@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      010e3e8f
  2. 11 6月, 2019 30 次提交