1. 22 7月, 2020 1 次提交
  2. 03 7月, 2020 1 次提交
    • A
      perf record: Fix duplicated sideband events with Intel PT system wide tracing · 442ad225
      Adrian Hunter 提交于
      Commit 0a892c1c ("perf record: Add dummy event during system wide
      synthesis") reveals an issue with Intel PT system wide tracing.
      Specifically that Intel PT already adds a dummy tracking event, and it
      is not the first event.  Adding another dummy tracking event causes
      duplicated sideband events.  Fix by checking for an existing dummy
      tracking event first.
      
      Example showing duplicated switch events:
      
       Before:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.895 MB perf.data ]
         # perf script --no-itrace --show-switch-events | head
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                  swapper     0 [007]  6390.516222: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [007]  6390.516223: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516224: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                rcu_sched    11 [007]  6390.516227: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [007]  6390.516228: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [002]  6390.516415: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
                  swapper     0 [002]  6390.516416: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  5556/5559
      
       After:
      
         # perf record -a -e intel_pt//u uname
         Linux
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.868 MB perf.data ]
         #  perf script --no-itrace --show-switch-events | head
                  swapper     0 [005]  6450.567013: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:  7179/7181
                     perf  7181 [005]  6450.567014: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                     perf  7181 [005]  6450.567028: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.567029: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:  7179/7181
                  swapper     0 [005]  6450.571699: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.571700: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
                rcu_sched    11 [005]  6450.571702: PERF_RECORD_SWITCH_CPU_WIDE OUT          next pid/tid:     0/0
                  swapper     0 [005]  6450.571703: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:    11/11
                  swapper     0 [005]  6450.579703: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt  next pid/tid:    11/11
                rcu_sched    11 [005]  6450.579704: PERF_RECORD_SWITCH_CPU_WIDE IN           prev pid/tid:     0/0
      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://lore.kernel.org/lkml/20200629091955.17090-3-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      442ad225
  3. 23 6月, 2020 5 次提交
  4. 06 5月, 2020 4 次提交
  5. 29 11月, 2019 2 次提交
  6. 22 11月, 2019 1 次提交
    • A
      perf record: Add a function to test for kernel support for AUX area sampling · 9bca1a4e
      Adrian Hunter 提交于
      Architectures are expected to know if AUX area sampling is supported by
      the hardware. Add a function perf_can_aux_sample() which will determine
      whether the kernel supports it.
      
      Committer notes:
      
      I reported that this message was taking place on a kernel without the
      required bits:
      
        # perf record --aux-sample -e '{intel_pt//u,branch-misses:u}'
        Error:
        The sys_perf_event_open() syscall returned with 7 (Argument list too long) for event (branch-misses:u).
        /bin/dmesg | grep -i perf may provide additional information.
      
      Adrian sent a patch addressing it, with this explanation:
      
       ----
        perf_can_aux_sample_size() always returned true because it did not pass
        the attribute size to sys_perf_event_open, nor correctly check the
        return value and errno.
       ----
      
      After applying it I get, later in the series, when --aux-sample is
      added:
      
        # perf record --aux-sample -e '{intel_pt//u,branch-misses:u}'
        AUX area sampling is not supported by kernel
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20191115124225.5247-4-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9bca1a4e
  7. 09 10月, 2019 2 次提交
  8. 07 10月, 2019 1 次提交
  9. 26 9月, 2019 1 次提交
  10. 25 9月, 2019 16 次提交
  11. 01 9月, 2019 1 次提交
  12. 30 8月, 2019 1 次提交
  13. 29 8月, 2019 1 次提交
  14. 30 7月, 2019 3 次提交