1. 07 11月, 2015 2 次提交
  2. 06 10月, 2015 2 次提交
  3. 14 9月, 2015 2 次提交
  4. 04 9月, 2015 1 次提交
    • A
      perf tools: Add a test for decoding of new x86 instructions · 98e4619f
      Adrian Hunter 提交于
      Add a new test titled:
      
      	Test x86 instruction decoder - new instructions
      
      The purpose of this test is to check the instruction decoder after new
      instructions have been added.  Initially, MPX instructions are tested
      which are already supported, but the definitions in x86-opcode-map.txt
      will be tweaked in a subsequent patch, after which this test can be run
      to verify those changes.
      
      The data for the test comes from assembly language instructions in
      insn-x86-dat-src.c which is converted into bytes by the scripts
      gen-insn-x86-dat.sh and gen-insn-x86-dat.awk, and included into the test
      program insn-x86.c as insn-x86-dat-32.c and insn-x86-dat-64.c.
      
      The conversion is not done as part of the perf tools build because the
      test data must be under (git) change control in order for the test to be
      repeatably-correct.  Also it may require a recent version of binutils.
      
      Commiter notes:
      
      Using it:
      
        # perf test decoder
        39: Test x86 instruction decoder - new instructions          : Ok
        # perf test -v decoder
        39: Test x86 instruction decoder - new instructions          :
        --- start ---
        test child forked, pid 21970
        Decoded ok: 0f 31                	rdtsc
        Decoded ok: f3 0f 1b 00          	bndmk  (%eax),%bnd0
        Decoded ok: f3 0f 1b 05 78 56 34 12 	bndmk  0x12345678,%bnd0
        Decoded ok: f3 0f 1b 18          	bndmk  (%eax),%bnd3
        <SNIP>
        Decoded ok: f2 e9 00 00 00 00    	bnd jmpq 402 <main+0x402>
        Decoded ok: f2 e9 00 00 00 00    	bnd jmpq 408 <main+0x408>
        Decoded ok: 67 f2 ff 21          	bnd jmpq *(%ecx)
        Decoded ok: f2 0f 85 00 00 00 00 	bnd jne 413 <main+0x413>
        test child finished with 0
        ---- end ----
        Test x86 instruction decoder - new instructions: Ok
        #
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qiaowei Ren <qiaowei.ren@intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1441196131-20632-3-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      98e4619f
  5. 07 8月, 2015 1 次提交
    • W
      perf tests: Add LLVM test for eBPF on-the-fly compiling · 9bc898c7
      Wang Nan 提交于
      Previous patches introduce llvm__compile_bpf() to compile source file to
      eBPF object. This patch adds testcase to test it. It also tests libbpf
      by opening generated object after applying next patch which introduces
      HAVE_LIBBPF_SUPPORT option.
      
      Since llvm__compile_bpf() prints long messages which users who don't
      explicitly test llvm doesn't care, this patch set verbose to -1 to
      suppress all debug, warning and error message, and hint user use 'perf
      test -v' to see the full output.
      
      For the same reason, if clang is not found in PATH and there's no [llvm]
      section in .perfconfig, skip this test.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kaixu Xia <xiakaixu@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/n/1436445342-1402-17-git-send-email-wangnan0@huawei.com
      [ Add tools/lib/bpf/ to tools/perf/MANIFEST, so that the tarball targets build ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9bc898c7
  6. 26 6月, 2015 1 次提交
  7. 29 5月, 2015 2 次提交
  8. 12 5月, 2015 1 次提交
  9. 22 3月, 2015 1 次提交
    • J
      perf tools: Add kmod_path__parse function · 3c8a67f5
      Jiri Olsa 提交于
      Provides united way of parsing kernel module path
      into several components.
      
      The new kmod_path__parse function and few defines:
      
        int __kmod_path__parse(struct kmod_path *m, const char *path,
                               bool alloc_name, bool alloc_ext);
      
        #define kmod_path__parse(__m, __p)      __kmod_path__parse(__m, __p, false, false)
        #define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false)
        #define kmod_path__parse_ext(__m, __p)  __kmod_path__parse(__m, __p, false, true)
      
      parse kernel module @path and updates @m argument like:
      
        @comp - true if @path contains supported compression suffix,
                false otherwise
        @kmod - true if @path contains '.ko' suffix in right position,
                false otherwise
        @name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name
                of the kernel module without suffixes, otherwise strudup-ed
                base name of @path
        @ext  - if (@alloc_ext && @comp) is true, it contains strdup-ed string
                the compression suffix
      
      It returns 0 if there's no strdup error, -ENOMEM otherwise.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3c8a67f5
  10. 20 3月, 2015 1 次提交
  11. 19 11月, 2014 1 次提交
  12. 15 10月, 2014 1 次提交
    • A
      perf tools: Remove hists from evsel · a635fc51
      Arnaldo Carvalho de Melo 提交于
      Now tools that deals want to have an hists per evsel need to call
      hists__init() before creating any evsels, which can be as early as when
      parsing the command line, so do it before calling parse_options().
      
      The current tools using hists/hist_entries are report, top and annotate,
      change them to request per evsel hists.
      
      This is in preparation for making evsels usable by 3rd party tools, that
      not necessarily live in perf's source code repository.
      Acked-by: NBorislav Petkov <bp@suse.de>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-usjx2la743f10ippj7p1b20x@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a635fc51
  13. 26 9月, 2014 3 次提交
    • A
      tools lib api: Adopt fdarray class from perf's evlist · 1b85337d
      Arnaldo Carvalho de Melo 提交于
      The extensible file description array that grew in the perf_evlist class
      can be useful for other tools, as it is not something that only evlists
      need, so move it to tools/lib/api/fd to ease sharing it.
      
      v2: Don't use {} like in:
      
       libapi_dirs:
      	$(QUIET_MKDIR)mkdir -p $(OUTPUT){fs,fd}/
      
      in Makefiles, as it will not work in some systems, as in ubuntu13.10.
      
      v3: Add fd/*.[ch] to LIBAPIKFS_SOURCES (Fix from Jiri Olsa)
      
      v4: Leave the fcntl(fd, O_NONBLOCK) in the evlist layer, remains to
          be checked if it is really needed there, but has no place in the
          fdarray class (Fix from Jiri Olsa)
      
      v5: Remove evlist details from fdarray grow/filter tests. Improve it a
          bit doing more tests about expected internal state.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-kleuni3hckbc3s0lu6yb9x40@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b85337d
    • A
      perf tests: Add pollfd growing test · 9ae28035
      Arnaldo Carvalho de Melo 提交于
        [acme@ssdandy linux]$ perf test "Add fd"
        34: Add fd to pollfd array, making it autogrow             : Ok
        [acme@ssdandy linux]$ perf test -v "Add fd"
        34: Add fd to pollfd array, making it autogrow             :
        --- start ---
        test child forked, pid 19817
      
        before growing array:   2 [ 1, 2 ]
        after 3rd add_pollfd:   3 [ 1, 2, 35 ]
        after 4th add_pollfd:   4 [ 1, 2, 35, 88 ]
        test child finished with 0
        ---- end ----
        Add fd to pollfd array, making it autogrow: Ok
        [acme@ssdandy linux]$
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-smflpyta146bzog7z0effjss@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9ae28035
    • A
      perf tests: Add test for perf_evlist__filter_pollfd() · 54dbfae3
      Arnaldo Carvalho de Melo 提交于
      That will use a synthetic evlist with just what is touched by this new
      method to check that it works as expected.
      
      Output in verbose mode:
      
        $ perf test -v pollfd
        33: Filter fds with revents mask in a pollfd array         :
        --- start ---
        filtering all but pollfd[2]:
        before:   5 [ 5, 4, 3, 2, 1 ]
         after:   1 [ 3 ]
        filtering all but (pollfd[0], pollfd[3]):
        before:   5 [ 5, 4, 3, 2, 1 ]
         after:   2 [ 5, 2 ]
        test child finished with 0
        ---- end ----
        Filter fds with revents mask in a pollfd array: Ok
        $
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-x7c8liszdvc3ocmanf2cet8p@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      54dbfae3
  14. 23 8月, 2014 1 次提交
  15. 16 8月, 2014 1 次提交
  16. 14 8月, 2014 1 次提交
    • N
      perf tools: Check recorded kernel version when finding vmlinux · 0a7e6d1b
      Namhyung Kim 提交于
      Currently vmlinux_path__init() only tries to find vmlinux file from
      current directory, /boot and some canonical directories with version
      number of the running kernel.  This can be a problem when reporting old
      data recorded on a kernel version not running currently.
      
      We can use --symfs option for this but it's annoying for user to do it
      always.  As we already have the info in the perf.data file, it can be
      changed to use it for the search automatically.
      
      Before:
      
        $ perf report
        ...
        # Samples: 4K of event 'cpu-clock'
        # Event count (approx.): 1067250000
        #
        # Overhead  Command     Shared Object      Symbol
        # ........  ..........  .................  ..............................
            71.87%     swapper  [kernel.kallsyms]  [k] recover_probed_instruction
      
      After:
      
        # Overhead  Command     Shared Object      Symbol
        # ........  ..........  .................  ....................
            71.87%     swapper  [kernel.kallsyms]  [k] native_safe_halt
      
      This requires to change signature of symbol__init() to receive struct
      perf_session_env *.
      Reported-by: NMinchan Kim <minchan@kernel.org>
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1407825645-24586-14-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0a7e6d1b
  17. 12 6月, 2014 3 次提交
  18. 01 6月, 2014 1 次提交
  19. 21 5月, 2014 1 次提交
  20. 16 5月, 2014 1 次提交
  21. 28 4月, 2014 3 次提交
  22. 18 2月, 2014 2 次提交
  23. 06 9月, 2013 1 次提交
  24. 03 9月, 2013 1 次提交
  25. 30 8月, 2013 1 次提交
  26. 08 8月, 2013 1 次提交
  27. 23 7月, 2013 1 次提交
  28. 28 5月, 2013 1 次提交
  29. 18 3月, 2013 1 次提交