1. 26 9月, 2014 2 次提交
    • 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
  2. 23 8月, 2014 1 次提交
  3. 16 8月, 2014 1 次提交
  4. 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
  5. 12 6月, 2014 3 次提交
  6. 01 6月, 2014 1 次提交
  7. 21 5月, 2014 1 次提交
  8. 16 5月, 2014 1 次提交
  9. 28 4月, 2014 3 次提交
  10. 18 2月, 2014 2 次提交
  11. 06 9月, 2013 1 次提交
  12. 03 9月, 2013 1 次提交
  13. 30 8月, 2013 1 次提交
  14. 08 8月, 2013 1 次提交
  15. 23 7月, 2013 1 次提交
  16. 28 5月, 2013 1 次提交
  17. 18 3月, 2013 1 次提交
  18. 16 3月, 2013 3 次提交
    • N
      perf test: Add test case for checking number of EXIT events · d723a550
      Namhyung Kim 提交于
      The new test__task_exit() test runs a simple "/usr/bin/true" workload and then
      checks whether the number of EXIT event is 1 or not.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/87obeljax4.fsf@sejong.aot.lge.com
      [ committer note: Fixup conflicts with f4c66b4 ( bp overflow tests ) ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d723a550
    • J
      perf tests: Test breakpoint overflow signal handler counts · 06933e3a
      Jiri Olsa 提交于
      Adding automated test to check the exact number of breakpoint event
      overflows and counts.
      
      This test was originally done by Vince Weaver for perf_event_tests.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1362940871-24486-7-git-send-email-jolsa@redhat.com
      [ committer note: s/pr_err/pr_debug/g i.e. print just OK or FAILED in non verbose mode ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      06933e3a
    • J
      perf tests: Test breakpoint overflow signal handler · 5a6bef47
      Jiri Olsa 提交于
      Adding automated test for breakpoint event signal handler checking if
      it's executed properly.
      
      The test is related to the proper handling of the RF EFLAGS bit on
      x86_64, but it's generic for all archs.
      
      First we check the signal handler is properly called and that the
      following debug exception return to user space wouldn't trigger
      recursive breakpoint.
      
      This is related to x86_64 RF EFLAGS bit being managed in a wrong way.
      
      Second we check that we can set breakpoint in signal handler, which is
      not possible on x86_64 if the signal handler is executed with RF EFLAG
      set.
      
      This test is inpired by overflow tests done by Vince Weaver.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/1362940871-24486-6-git-send-email-jolsa@redhat.com
      [ committer note: s/pr_err/pr_debug/g i.e. print just OK or FAILED in non verbose mode ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5a6bef47
  19. 25 1月, 2013 4 次提交
    • A
      perf test: Allow skipping tests · 2ae82878
      Arnaldo Carvalho de Melo 提交于
      Sometimes a test is problematic for some reason and one wants to skip it,
      for instance:
      
      [root@sandy ~]# perf test
         1: vmlinux symtab matches kallsyms                        : Ok
         2: detect open syscall event                              : Ok
         3: detect open syscall event on all cpus                  : Ok
         4: read samples using the mmap interface                  : Ok
         5: parse events tests                                     :  Warning: bad op token {
          Warning: bad op token {
          Warning: bad op token {
          Warning: bad op token {
          Warning: bad op token {
          Warning: function is_writable_pte not defined
        Segmentation fault (core dumped)
      
      So now we can use -s/--skip while the problematic tests are being fixed,
      allowing us to test all the other entries:
      
        [root@sandy ~]# perf test -s 5
         1: vmlinux symtab matches kallsyms                        : Ok
         2: detect open syscall event                              : Ok
         3: detect open syscall event on all cpus                  : Ok
         4: read samples using the mmap interface                  : Ok
         5: parse events tests                                     : Skip (user override)
         6: x86 rdpmc test                                         : Ok
         7: Validate PERF_RECORD_* events & perf_sample fields     : Ok
         8: Test perf pmu format parsing                           : Ok
         9: Test dso data interface                                : Ok
        10: roundtrip evsel->name check                            : Ok
        11: Check parsing of sched tracepoints fields              : Ok
        12: Generate and check syscalls:sys_enter_open event fields: Ok
        13: struct perf_event_attr setup                           : Ok
        14: Test matching and linking mutliple hists               : Ok
        15: Try 'use perf' in python, checking link problems       : Ok
        [root@sandy ~]#
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-klzd8p57jzdryafqkmlppcb1@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2ae82878
    • J
      perf tests: Add return states enum for tests · f4c1ea5f
      Jiri Olsa 提交于
      Test can currently return one of 3 states: ok, fail, skip.
      
      The ok and fail states are self-explanatory. The skip state means that
      some of the conditions for running the test was not met, making it
      impossible to even run the test. For instance, if the hardware doesn't
      support the 'precise' level required by a test, it will be skipped.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Link: http://lkml.kernel.org/n/tip-04vnsdndarctfb1eii5c9hcy@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f4c1ea5f
    • A
      perf test: Check for linking problems in the python binding · 54359d33
      Arnaldo Carvalho de Melo 提交于
      It just will add the O= builddir to PYTHONPATH and try to 'use perf',
      which will, in verbose mode show the python backtrace with the missing
      symbols, such as in the problem fixed in the patch after this one:
      
        # perf test -v 15
        15: Try 'use perf' in python, checking link problems       :
        --- start ---
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ImportError: /home/acme/git/build/perf//python/perf.so: undefined symbol: test_attr__enabled
        ---- end ----
        Try 'use perf' in python, checking link problems: FAILED!
        #
      
      Loooong overdue, done.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      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-zmd2oq9gz6t1u145ub7qm2nv@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      54359d33
    • N
      perf test: Add a test case for hists__{match,link} · f8ebb0cd
      Namhyung Kim 提交于
      As they are used from diff and event group report, add a test case to
      verify their behaviors.
      
      In this test I made a fake machine and two evsel.  Each evsel got 10
      samples (so hist entries) - 5 are common and the rests are not.  So
      after hists__match() both of them will have 5 entries with pair set.
      
      And the second evsel has a collapsed entry so that the total number is 9
      - I made it in order to simulate more realistic case.  Thus after
      hists__link the first entry will have 14 entries - 5 are common (w/
      pair), 5 are unmatch (w/o pair) and 4 are dummy (w/ pair).  And the
      second entry will have 9 entries all have its pair.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.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/1355128197-18193-5-git-send-email-namhyung@kernel.org
      [ committer note: fixed up clashes with cset that moved methods to machine.h ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f8ebb0cd
  20. 15 11月, 2012 10 次提交