1. 09 8月, 2016 2 次提交
  2. 04 8月, 2016 1 次提交
    • A
      perf tests bpf: Use SyS_epoll_wait alias · c369e0a1
      Arnaldo Carvalho de Melo 提交于
      Something made the sys_epoll_wait() function alias not to be found in
      the vmlinux DWARF info, being found only in /proc/kallsyms, which made
      the BPF perf tests to fail:
      
        [root@jouet ~]# perf test BPF
        37: Test BPF filter                                          :
        37.1: Test basic BPF filtering                               : FAILED!
        37.2: Test BPF prologue generation                           : Skip
        37.3: Test BPF relocation checker                            : Skip
        [root@jouet ~]#
      
      Using -v we can see it is failing to find DWARF info for the probed function,
      sys_epoll_wait, which we can find in /proc/kallsyms but not in vmlinux with
      CONFIG_DEBUG_INFO:
      
        [root@jouet ~]# grep -w sys_epoll_wait /proc/kallsyms
        ffffffffbd295b50 T sys_epoll_wait
        [root@jouet ~]#
      
        [root@jouet ~]# readelf -wi /lib/modules/4.7.0+/build/vmlinux | grep -w sys_epoll_wait
        [root@jouet ~]#
      
      If we try to use perf probe:
      
      [root@jouet ~]# perf probe sys_epoll_wait
      Failed to find debug information for address ffffffffbd295b50
      Probe point 'sys_epoll_wait' not found.
        Error: Failed to add events.
      [root@jouet ~]#
      
      It all works if we use SyS_epoll_wait, that is just an alias to the probed
      function:
      
        [root@jouet ~]# grep -i sys_epoll_wait /proc/kallsyms
        ffffffffbd295b50 T SyS_epoll_wait
        ffffffffbd295b50 T sys_epoll_wait
        [root@jouet ~]#
      
      So use it:
      
        [root@jouet ~]# perf test BPF
        37: Test BPF filter                                          :
        37.1: Test basic BPF filtering                               : Ok
        37.2: Test BPF prologue generation                           : Ok
        37.3: Test BPF relocation checker                            : Ok
        [root@jouet ~]#
      
      Further info:
      
        [root@jouet ~]# gcc --version
        gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
        [acme@jouet linux]$ cat /etc/fedora-release
        Fedora release 24 (Twenty Four)
      
      Investigation as to why it fails is still underway, but it was always
      going from sys_epoll_wait to SyS_epoll_wait when looking up the DWARF
      info in vmlinux, and this is what is breaking now.
      
      Switching to use SyS_epoll_wait allows this test to proceed and test the
      BPF code it was designed for, so lets have this in to allow passing this
      test while we fix the root cause.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-7hekjp0bodwjbb419sl2b55h@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c369e0a1
  3. 03 8月, 2016 5 次提交
  4. 02 8月, 2016 4 次提交
  5. 29 7月, 2016 4 次提交
  6. 28 7月, 2016 1 次提交
  7. 27 7月, 2016 1 次提交
  8. 25 7月, 2016 1 次提交
  9. 24 7月, 2016 1 次提交
    • D
      x86/insn: remove pcommit · fd1d961d
      Dan Williams 提交于
      The pcommit instruction is being deprecated in favor of either ADR
      (asynchronous DRAM refresh: flush-on-power-fail) at the platform level, or
      posted-write-queue flush addresses as defined by the ACPI 6.x NFIT (NVDIMM
      Firmware Interface Table).
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Acked-by: NIngo Molnar <mingo@redhat.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      fd1d961d
  10. 23 7月, 2016 1 次提交
  11. 21 7月, 2016 2 次提交
  12. 20 7月, 2016 1 次提交
  13. 19 7月, 2016 13 次提交
  14. 18 7月, 2016 2 次提交
  15. 16 7月, 2016 1 次提交
    • W
      perf record: Add --tail-synthesize option · 4ea648ae
      Wang Nan 提交于
      When working with overwritable ring buffer there's a inconvenience
      problem: if perf dumps data after a long period after it starts,
      non-sample events may lost, which makes following 'perf report' unable
      to identify proc name and mmap layout. For example:
      
       # perf record -m 4 -e raw_syscalls:* -g --overwrite --switch-output \
              dd if=/dev/zero of=/dev/null
      
      send SIGUSR2 after dd runs long enough. The resuling perf.data lost
      correct comm and mmap events:
      
       # perf script -i perf.data.2016061522374354
       perf 24478 [004] 2581325.601789:  raw_syscalls:sys_exit: NR 0 = 512
       ^^^^
       Should be 'dd'
                         27b2e8 syscall_slow_exit_work+0xfe2000e3 (/lib/modules/4.6.0-rc3+/build/vmlinux)
                         203cc7 do_syscall_64+0xfe200117 (/lib/modules/4.6.0-rc3+/build/vmlinux)
                         b18d83 return_from_SYSCALL_64+0xfe200000 (/lib/modules/4.6.0-rc3+/build/vmlinux)
                   7f47c417edf0 [unknown] ([unknown])
                   ^^^^^^^^^^^^
                   Fail to unwind
      
      This patch provides a '--tail-synthesize' option, allows perf to collect
      system status when finalizing output file. In resuling output file, the
      non-sample events reflect system status when dumping data.
      
      After this patch:
       # perf record -m 4 -e raw_syscalls:* -g --overwrite --switch-output --tail-synthesize \
              dd if=/dev/zero of=/dev/null
      
       # perf script -i perf.data.2016061600544998
       dd 27364 [004] 2583244.994464: raw_syscalls:sys_enter: NR 1 (1, ...
       ^^
       Correct comm
                         203a18 syscall_trace_enter_phase2+0xfe2001a8 ([kernel.kallsyms])
                         203aa5 syscall_trace_enter+0xfe200055 ([kernel.kallsyms])
                         203caa do_syscall_64+0xfe2000fa ([kernel.kallsyms])
                         b18d83 return_from_SYSCALL_64+0xfe200000 ([kernel.kallsyms])
                          d8e50 __GI___libc_write+0xffff01d9639f4010 (/tmp/oxygen_root-w00229757/lib64/libc-2.18.so)
                          ^^^^^
                          Correct unwind
      
      This option doesn't aim to solve this problem completely. If a process
      terminates before SIGUSR2, we still lost its COMM and MMAP events. For
      example, we can't unwind correctly from the final perf.data we get from
      the previous example, because when perf collects the final output file
      (when we press C-c), 'dd' has been terminated so its '/proc/<pid>/mmap'
      becomes empty.
      
      However, this is a cheaper choice. To completely solve this problem we
      need to continously output non-sample events. To satisify the
      requirement of daemonization, we need to merge them periodically. It is
      possible but requires much more code and cycles.
      
      Automatically select --tail-synthesize when --overwrite is provided.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1468485287-33422-16-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4ea648ae