1. 09 4月, 2021 2 次提交
  2. 06 8月, 2020 4 次提交
  3. 01 9月, 2019 1 次提交
  4. 09 7月, 2019 1 次提交
  5. 25 6月, 2019 3 次提交
  6. 18 6月, 2019 2 次提交
  7. 11 6月, 2019 5 次提交
  8. 05 6月, 2019 6 次提交
  9. 17 5月, 2019 3 次提交
    • A
      perf intel-pt: Fix sample timestamp wrt non-taken branches · 1b6599a9
      Adrian Hunter 提交于
      The sample timestamp is updated to ensure that the timestamp represents
      the time of the sample and not a branch that the decoder is still
      walking towards. The sample timestamp is updated when the decoder
      returns, but the decoder does not return for non-taken branches. Update
      the sample timestamp then also.
      
      Note that commit 3f04d98e ("perf intel-pt: Improve sample
      timestamp") was also a stable fix and appears, for example, in v4.4
      stable tree as commit a4ebb58fd124 ("perf intel-pt: Improve sample
      timestamp").
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org # v4.4+
      Fixes: 3f04d98e ("perf intel-pt: Improve sample timestamp")
      Link: http://lkml.kernel.org/r/20190510124143.27054-4-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b6599a9
    • A
      perf intel-pt: Fix improved sample timestamp · 61b6e08d
      Adrian Hunter 提交于
      The decoder uses its current timestamp in samples. Usually that is a
      timestamp that has already passed, but in some cases it is a timestamp
      for a branch that the decoder is walking towards, and consequently
      hasn't reached.
      
      The intel_pt_sample_time() function decides which is which, but was not
      handling TNT packets exactly correctly.
      
      In the case of TNT, the timestamp applies to the first branch, so the
      decoder must first walk to that branch.
      
      That means intel_pt_sample_time() should return true for TNT, and this
      patch makes that change. However, if the first branch is a non-taken
      branch (i.e. a 'N'), then intel_pt_sample_time() needs to return false
      for subsequent taken branches in the same TNT packet.
      
      To handle that, introduce a new state INTEL_PT_STATE_TNT_CONT to
      distinguish the cases.
      
      Note that commit 3f04d98e ("perf intel-pt: Improve sample
      timestamp") was also a stable fix and appears, for example, in v4.4
      stable tree as commit a4ebb58fd124 ("perf intel-pt: Improve sample
      timestamp").
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org # v4.4+
      Fixes: 3f04d98e ("perf intel-pt: Improve sample timestamp")
      Link: http://lkml.kernel.org/r/20190510124143.27054-3-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      61b6e08d
    • A
      perf intel-pt: Fix instructions sampling rate · 7ba8fa20
      Adrian Hunter 提交于
      The timestamp used to determine if an instruction sample is made, is an
      estimate based on the number of instructions since the last known
      timestamp. A consequence is that it might go backwards, which results in
      extra samples. Change it so that a sample is only made when the
      timestamp goes forwards.
      
      Note this does not affect a sampling period of 0 or sampling periods
      specified as a count of instructions.
      
      Example:
      
       Before:
      
       $ perf script --itrace=i10us
       ls 13812 [003] 2167315.222583:       3270 instructions:u:      7fac71e2e494 __GI___tunables_init+0xf4 (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:      30902 instructions:u:      7fac71e2da0f _dl_cache_libcmp+0x2f (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:         10 instructions:u:      7fac71e2d9ff _dl_cache_libcmp+0x1f (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:          8 instructions:u:      7fac71e2d9ea _dl_cache_libcmp+0xa (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:         14 instructions:u:      7fac71e2d9ea _dl_cache_libcmp+0xa (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:          6 instructions:u:      7fac71e2d9ff _dl_cache_libcmp+0x1f (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:         14 instructions:u:      7fac71e2d9ff _dl_cache_libcmp+0x1f (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:          4 instructions:u:      7fac71e2dab2 _dl_cache_libcmp+0xd2 (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222728:      16423 instructions:u:      7fac71e2477a _dl_map_object_deps+0x1ba (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222734:      12731 instructions:u:      7fac71e27938 _dl_name_match_p+0x68 (/lib/x86_64-linux-gnu/ld-2.28.so)
       ...
      
       After:
       $ perf script --itrace=i10us
       ls 13812 [003] 2167315.222583:       3270 instructions:u:      7fac71e2e494 __GI___tunables_init+0xf4 (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222667:      30902 instructions:u:      7fac71e2da0f _dl_cache_libcmp+0x2f (/lib/x86_64-linux-gnu/ld-2.28.so)
       ls 13812 [003] 2167315.222728:      16479 instructions:u:      7fac71e2477a _dl_map_object_deps+0x1ba (/lib/x86_64-linux-gnu/ld-2.28.so)
       ...
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Fixes: f4aa0819 ("perf tools: Add Intel PT decoder")
      Link: http://lkml.kernel.org/r/20190510124143.27054-2-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ba8fa20
  10. 29 3月, 2019 1 次提交
  11. 06 2月, 2019 3 次提交
  12. 06 11月, 2018 1 次提交
  13. 21 9月, 2018 1 次提交
    • A
      perf intel-pt: Implement decoder flags for trace begin / end · bea63857
      Adrian Hunter 提交于
      Have the Intel PT decoder implement the new Intel PT decoder flags for
      trace begin / end.
      
      Previously, the decoder would indicate begin / end by a branch from / to
      zero. That hides useful information, in particular when a trace ends
      with a call. That happens when using address filters, for example:
      
        $ perf record -e intel_pt/cyc,mtc_period=0,noretcomp/u --filter='filter main @ /bin/uname ' uname Linux
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.031 MB perf.data ]
      
      Before:
      
        $ perf script --itrace=cre -Ftime,flags,ip,sym,symoff,addr --ns
         7249.622183310:   tr strt         0 [unknown] =>   401590 main+0x0
         7249.622183311:   call       4015b9 main+0x29 =>        0 [unknown]
         7249.622183711:   tr strt         0 [unknown] =>   4015be main+0x2e
         7249.622183714:   call       4015c8 main+0x38 =>        0 [unknown]
         7249.622247731:   tr strt         0 [unknown] =>   4015cd main+0x3d
         7249.622247760:   call       4015d7 main+0x47 =>        0 [unknown]
         7249.622248340:   tr strt         0 [unknown] =>   4015dc main+0x4c
         7249.622248341:   call       4015e1 main+0x51 =>        0 [unknown]
         7249.622248681:   tr strt         0 [unknown] =>   4015e6 main+0x56
         7249.622248682:   call       4015eb main+0x5b =>        0 [unknown]
         7249.622248970:   tr strt         0 [unknown] =>   4015f0 main+0x60
         7249.622248971:   call       401612 main+0x82 =>        0 [unknown]
         7249.622249757:   tr strt         0 [unknown] =>   401617 main+0x87
         7249.622249770:   call       401847 main+0x2b7 =>        0 [unknown]
         7249.622250606:   tr strt         0 [unknown] =>   40184c main+0x2bc
         7249.622250612:   call       4019bf main+0x42f =>        0 [unknown]
         7249.622256823:   tr strt         0 [unknown] =>   4019c4 main+0x434
         7249.622256863:   call       4019f5 main+0x465 =>        0 [unknown]
         7249.622264217:   tr strt         0 [unknown] =>   4019fa main+0x46a
         7249.622264235:   call       401832 main+0x2a2 =>        0 [unknown]
      
      After:
      
        $ perf script --itrace=cre -Ftime,flags,ip,sym,symoff,addr --ns
         7249.622183310:   tr strt              0 [unknown] =>   401590 main+0x0
         7249.622183311:   tr end  call    4015b9 main+0x29 =>   401ef0 set_program_name+0x0
         7249.622183711:   tr strt              0 [unknown] =>   4015be main+0x2e
         7249.622183714:   tr end  call    4015c8 main+0x38 =>   4014b0 setlocale@plt+0x0
         7249.622247731:   tr strt              0 [unknown] =>   4015cd main+0x3d
         7249.622247760:   tr end  call    4015d7 main+0x47 =>   4012d0 bindtextdomain@plt+0x0
         7249.622248340:   tr strt              0 [unknown] =>   4015dc main+0x4c
         7249.622248341:   tr end  call    4015e1 main+0x51 =>   4012b0 textdomain@plt+0x0
         7249.622248681:   tr strt              0 [unknown] =>   4015e6 main+0x56
         7249.622248682:   tr end  call    4015eb main+0x5b =>   404340 atexit+0x0
         7249.622248970:   tr strt              0 [unknown] =>   4015f0 main+0x60
         7249.622248971:   tr end  call    401612 main+0x82 =>   401320 getopt_long@plt+0x0
         7249.622249757:   tr strt              0 [unknown] =>   401617 main+0x87
         7249.622249770:   tr end  call    401847 main+0x2b7 =>   401360 uname@plt+0x0
         7249.622250606:   tr strt              0 [unknown] =>   40184c main+0x2bc
         7249.622250612:   tr end  call    4019bf main+0x42f =>   401b10 print_element+0x0
         7249.622256823:   tr strt              0 [unknown] =>   4019c4 main+0x434
         7249.622256863:   tr end  call    4019f5 main+0x465 =>   401340 __overflow@plt+0x0
         7249.622264217:   tr strt              0 [unknown] =>   4019fa main+0x46a
         7249.622264235:   tr end  call    401832 main+0x2a2 =>   401520 exit@plt+0x0
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lkml.kernel.org/r/20180920130048.31432-7-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bea63857
  14. 06 6月, 2018 3 次提交
  15. 08 3月, 2018 3 次提交
  16. 30 6月, 2017 1 次提交