1. 02 Aug, 2016 2 commits
  2. 01 Aug, 2016 3 commits
  3. 29 Jul, 2016 2 commits
  4. 28 Jul, 2016 1 commit
  5. 25 Jul, 2016 3 commits
  6. 22 Jul, 2016 5 commits
  7. 21 Jul, 2016 3 commits
  8. 20 Jul, 2016 1 commit
  9. 19 Jul, 2016 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160718' of... · 5048c2af
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160718' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
       - Properly report when a function wildcard produces no matches in 'perf probe'
         (Masami Hiramatsu)
      
       - Balance opening and reading events in 'perf stat', which could cause
         it to get stuck trying to close invalid file descriptors (Mark Rutland)
      
      Infrastructure changes:
      
       - Copy more headers from the kernel, this time for headers that
         were just including the contents of its kernel counterparts, should
         help resolving the problems with linux-next, where some uapi related
         patches seem to be breaking tools/object/ build. (Arnaldo Carvalho de Melo)
      
         Some more combing will be done, but at least it is possible to build
         perf out of tree, via a detached tarball (make help | grep perf),
         without including kernel files in its MANIFEST (Arnaldo Carvalho de Melo)
      
       - Fix smatch found errors that were not causing problems, but are
         mistakes nonetheless (Dan Carpenter)
      
       - Fix string vs. byte array resolving in the python script code (Jiri Olsa)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5048c2af
  10. 18 Jul, 2016 15 commits
  11. 16 Jul, 2016 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160715' of... · 09211e25
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160715' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
       - Allow reading from a backward ring buffer (one setup via sys_perf_event_open()
         with perf_event_attr.write_backward = 1) (Wang Nan)
      
      Infrastructure changes:
      
       - Fix the build on Android NDK r12b (initially just for ARM), that is now port
         of my perf-build container collection and will get tested prior to sending
         patches upstream (Arnaldo Carvalho de Melo)
      
       - Add correct header for IPv6 definitions
      
       - Fix bitsperlong.h fallout (Arnaldo Carvalho de Melo, Peter Zijlstra)
      
       - Use base 0 (auto) in filename__read_ull(), so that we can handle hex values too (Jiri Olsa)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      09211e25
  12. 15 Jul, 2016 3 commits
    • Arnaldo Carvalho de Melo's avatar
      objtool: Initialize variable to silence old compiler · b49364f3
      Arnaldo Carvalho de Melo authored
      gcc version 4.1.2 20080704 (Red Hat 4.1.2-55) barfs with:
      
          CC       /tmp/build/objtool/builtin-check.o
        cc1: warnings being treated as errors
        builtin-check.c: In function 'cmd_check':
        builtin-check.c:667: warning: 'prev_rela' may be used uninitialized in this function
        mv: cannot stat `/tmp/build/objtool/.builtin-check.o.tmp': No such file or directory
        make[1]: *** [/tmp/build/objtool/builtin-check.o] Error 1
      
      Init it to NULL to silence it.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-qolo31rl2ojlwj1lj9dhemyz@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b49364f3
    • Arnaldo Carvalho de Melo's avatar
      objtool: Add -I$(srctree)/tools/arch/$(ARCH)/include/uapi · 4a0982f9
      Arnaldo Carvalho de Melo authored
      So that it can find asm/bitsperlong.h to get the __BITS_PER_LONG
      definition.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-pr3pvskh65pey4po7t122z4j@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4a0982f9
    • Wang Nan's avatar
      perf record: Add --tail-synthesize option · 4ea648ae
      Wang Nan authored
      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: default avatarWang 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4ea648ae