1. 07 7月, 2014 4 次提交
    • A
      perf hists browser: Override ui_browser refresh_dimensions method · 357cfff1
      Arnaldo Carvalho de Melo 提交于
      This requires some more work so that we can really just use the width of
      current entries when we want to partition the screen.
      
      Right now its just a prep patch so that we can have where to update
      ui_browser->rows when introducing the column headers line, that will be
      togglable, so we need to update it everytime we refresh the dimensions
      of the browser.
      
      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-ovk654rx525b4657y0mh6ku9@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      357cfff1
    • A
      perf hists browser: Introduce gotorc method · ca3ff33b
      Arnaldo Carvalho de Melo 提交于
      That will allow us to add a row offset to open up space for the column
      headers.
      
      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-otc3ployokfci5qi81o7jo22@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ca3ff33b
    • A
      perf ui browser: Allow overriding refresh_dimensions method · fa70b5d6
      Arnaldo Carvalho de Melo 提交于
      Some browsers, like the hist_browser, may want to be notified everytime
      a refresh_dimensions is needed, so that it can reset ui_browser->rows,
      for instance, or do some other related reaction to screen resizings.
      
      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-ielvluuemzn30bneh0zk3twi@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fa70b5d6
    • A
      perf ui browser: Add ->rows to disambiguate from ->height · 62c95ae3
      Arnaldo Carvalho de Melo 提交于
      The ui_browser->height is about the whole browser "window", including
      any header, status lines or any other space needed for some "Yes", "No",
      etc buttons a descendent browser, like hist_browser, may have.
      
      Since the navigation is done mostly on the ui_browser methods, it needs
      to know how many rows are on the screen, while details about what other
      components are, say, if a header (that may be composed of multiple
      lines, etc) is present.
      
      Besides this we'll need to add a ui_browser->refresh_dimensions() hook
      so that browsers like hist_browser can update ->rows in response to
      screen resizes, this will come in a follow up patch.
      
      This patch just adds ->rows and updates it when updating ->height, keeps
      using ->height for the only other widget that can come with ui_browser,
      the scrollbar, that goes on using all the height on the rightmost column
      in the screen, using ->rows for the keyboard navigation needs.
      
      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-xexmwg1mv7u03j5imn66jdak@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      62c95ae3
  2. 27 6月, 2014 9 次提交
    • S
      perf script: Handle the num array type in python properly · 8ac631cd
      Sebastian Andrzej Siewior 提交于
      The raw_syscalls:sys_enter tracer for instance passes has one argument
      named 'arg' which is an array of 6 integers. Right the python scripts
      gets only 0 passed as an argument. The reason is that
      pevent_read_number() can not handle data types of 48 and returns always
      0.
      This patch changes this by passing num array as list of nums which fit
      the description. As a result python will now see a list named arg which
      contains 6 (integer) items.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/1401207274-8170-2-git-send-email-bigeasy@linutronix.deSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      8ac631cd
    • S
      perf script: Move the number processing into its own function · 33058b94
      Sebastian Andrzej Siewior 提交于
      I was going to change something here and the result was so much on the
      right side of the screen that I decided to move that piece into its own
      function.
      This patch should make no function change except the moving the code
      into its own function.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/1401207274-8170-1-git-send-email-bigeasy@linutronix.deSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      33058b94
    • J
      perf tools: Fix wrong condition for allocation failure · d180ac14
      Jiri Olsa 提交于
      Check real allocated pointer for NULL.
      
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      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: 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-5rfzbalwjphmdzzil74eazyl@git.kernel.orgSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      d180ac14
    • S
      perf tools powerpc: Adjust callchain based on DWARF debug info · a60335ba
      Sukadev Bhattiprolu 提交于
      When saving the callchain on Power, the kernel conservatively saves excess
      entries in the callchain. A few of these entries are needed in some cases
      but not others. We should use the DWARF debug information to determine
      when the entries are  needed.
      
      Eg: the value in the link register (LR) is needed only when it holds the
      return address of a function. At other times it must be ignored.
      
      If the unnecessary entries are not ignored, we end up with duplicate arcs
      in the call-graphs.
      
      Use the DWARF debug information to determine if any callchain entries
      should be ignored when building call-graphs.
      
      Callgraph before the patch:
      
          14.67%          2234  sprintft  libc-2.18.so       [.] __random
                  |
                  --- __random
                     |
                     |--61.12%-- __random
                     |          |
                     |          |--97.15%-- rand
                     |          |          do_my_sprintf
                     |          |          main
                     |          |          generic_start_main.isra.0
                     |          |          __libc_start_main
                     |          |          0x0
                     |          |
                     |           --2.85%-- do_my_sprintf
                     |                     main
                     |                     generic_start_main.isra.0
                     |                     __libc_start_main
                     |                     0x0
                     |
                      --38.88%-- rand
                                |
                                |--94.01%-- rand
                                |          do_my_sprintf
                                |          main
                                |          generic_start_main.isra.0
                                |          __libc_start_main
                                |          0x0
                                |
                                 --5.99%-- do_my_sprintf
                                           main
                                           generic_start_main.isra.0
                                           __libc_start_main
                                           0x0
      
      Callgraph after the patch:
      
          14.67%          2234  sprintft  libc-2.18.so       [.] __random
                  |
                  --- __random
                     |
                     |--95.93%-- rand
                     |          do_my_sprintf
                     |          main
                     |          generic_start_main.isra.0
                     |          __libc_start_main
                     |          0x0
                     |
                      --4.07%-- do_my_sprintf
                                main
                                generic_start_main.isra.0
                                __libc_start_main
                                0x0
      
      TODO:	For split-debug info objects like glibc, we can only determine
      	the call-frame-address only when both .eh_frame and .debug_info
      	sections are available. We should be able to determin the CFA
      	even without the .eh_frame section.
      
      Fix suggested by Anton Blanchard.
      
      Thanks to valuable input on DWARF debug information from Ulrich Weigand.
      Reported-by: NMaynard Johnson <maynard@us.ibm.com>
      Tested-by: NMaynard Johnson <maynard@us.ibm.com>
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/20140625154903.GA29607@us.ibm.comSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      a60335ba
    • R
      tools lib traceevent: Fix a risk for doing free on uninitialized pointer · 21da83fb
      Rickard Strandqvist 提交于
      Fix a risk of doing free on an uninitialized pointer.
      
      This was found using a static code analysis program called cppcheck.
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      Link: http://lkml.kernel.org/r/1403608150-13037-1-git-send-email-rickard_strandqvist@spectrumdigital.seSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      21da83fb
    • S
      perf trace: Add possibility to switch off syscall events · e281a960
      Stanislav Fomichev 提交于
      Currently, we may either trace syscalls or syscalls+pagefaults.
      
      We'd like to be able to trace *only* pagefaults and this commit
      implements this feature.
      
      Example:
      
        [root@zoo /]# echo 1 > /proc/sys/vm/drop_caches ; trace --no-syscalls -F -p `pidof xchat`
             0.000 ( 0.000 ms): xchat/4574 majfault [g_unichar_get_script+0x11] => /usr/lib64/libglib-2.0.so.0.3800.2@0xc403b (x.)
             0.202 ( 0.000 ms): xchat/4574 majfault [_cairo_hash_table_lookup+0x53] => 0x2280ff0 (?.)
            20.854 ( 0.000 ms): xchat/4574 majfault [gdk_cairo_set_source_pixbuf+0x110] => /usr/bin/xchat@0x6da1f (x.)
          1022.000 ( 0.000 ms): xchat/4574 majfault [__memcpy_sse2_unaligned+0x29] => 0x7ff5a8ca0400 (?.)
        ^C[root@zoo /]#
      
      Below we can see malloc calls, 'trace' reading symbol tables in libraries to
      resolve symbols, etc.
      
        [root@zoo /]# echo 1 > /proc/sys/vm/drop_caches ; trace --no-syscalls -F all --cpu 1 sleep 10
             0.000 ( 0.000 ms): chrome/26589 minfault [0x1b53129] => /tmp/perf-26589.map@0x33cbcbf7f000 (x.)
            96.477 ( 0.000 ms): libvirtd/947 minfault [copy_user_enhanced_fast_string+0x5] => 0x7f7685bba000 (?k)
           113.164 ( 0.000 ms): Xorg/1063 minfault [0x786da] => 0x7fce52882a3c (?.)
          7162.801 ( 0.000 ms): chrome/3747 minfault [0x8e1a89] => 0xfcaefed0008 (?.)
      <SNIP>
          7773.138 ( 0.000 ms): chrome/3886 minfault [0x8e1a89] => 0xfcb0ce28008 (?.)
          7992.022 ( 0.000 ms): chrome/26574 minfault [0x1b5a708] => 0x3de7b5fc5000 (?.)
          8108.949 ( 0.000 ms): qemu-system-x8/4537 majfault [_int_malloc+0xee] => 0x7faffc466d60 (?.)
          8108.975 ( 0.000 ms): qemu-system-x8/4537 minfault [_int_malloc+0x102] => 0x7faffc466d60 (?.)
      <SNIP>
          8148.174 ( 0.000 ms): qemu-system-x8/4537 minfault [_int_malloc+0x102] => 0x7faffc4eb500 (?.)
          8270.855 ( 0.000 ms): chrome/26245 minfault [do_bo_emit_reloc+0xdb] => 0x45d092bc004 (?.)
          8270.869 ( 0.000 ms): chrome/26245 minfault [do_bo_emit_reloc+0x108] => 0x45d09150000 (?.)
      no symbols found in /usr/lib64/libspice-server.so.1.9.0, maybe install a debug package?
          8273.831 ( 0.000 ms): trace/20198 majfault [__memcmp_sse4_1+0xbc6] => /usr/lib64/libspice-server.so.1.9.0@0xdf000 (d.)
      <SNIP>
          8275.121 ( 0.000 ms): trace/20198 minfault [dso__load+0x38] => 0x14fe756 (?.)
      no symbols found in /usr/lib64/libelf-0.158.so, maybe install a debug package?
          8275.142 ( 0.000 ms): trace/20198 minfault [__memcmp_sse4_1+0xbc6] => /usr/lib64/libelf-0.158.so@0x0 (d.)
      <SNIP>
        [root@zoo /]#
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1403799268-1367-6-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e281a960
    • S
      perf trace: Add pagefaults record and replay support · 1e28fe0a
      Stanislav Fomichev 提交于
      Previous commit added live pagefault trace support, this one adds record
      and replay support.
      
      Example:
      
        [root@zoo /]# echo 1 > /proc/sys/vm/drop_caches ; trace -F all record -a sleep 10
        [ perf record: Woken up 0 times to write data ]
        [ perf record: Captured and wrote 1029.722 MB perf.data (~44989242 samples) ]
      
        [root@zoo /]# ls -la perf.data
        -rw-------. 1 root root 1083921722 Jun 26 17:44 perf.data
      
        [root@zoo /]# perf evlist
        raw_syscalls:sys_enter
        raw_syscalls:sys_exit
        major-faults
        minor-faults
      
        [root@zoo /]# trace -i perf.data | grep -v trace\/ | tail -15
           156.137 ( 0.000 ms): perl/18476 minfault [0xb4243] => 0x0 (?.)
           156.139 ( 0.000 ms): perl/18476 minfault [Perl_sv_clear+0x123] => 0x0 (?.)
           156.140 ( 0.000 ms): perl/18476 minfault [Perl_sv_clear+0xc4] => 0x0 (?.)
           156.144 ( 0.000 ms): perl/18476 minfault [_int_free+0xda] => 0x0 (?.)
           156.151 ( 0.000 ms): perl/18476 minfault [_int_free+0x1df] => 0x0 (?.)
           156.158 ( 0.000 ms): perl/18476 minfault [0xb4243] => 0x0 (?.)
           156.161 ( 0.000 ms): perl/18476 minfault [0xb4243] => 0x0 (?.)
           156.168 ( 0.000 ms): perl/18476 minfault [0xb4243] => 0x0 (?.)
           156.172 ( 0.000 ms): perl/18476 minfault [0xb4243] => 0x0 (?.)
           156.173 ( 0.000 ms): perl/18476 minfault [_int_free+0xda] => 0x0 (?.)
           156.183 ( 0.000 ms): perl/18476 minfault [Perl_hfree_next_entry+0xb4] => 0x0 (?.)
           156.197 ( 0.000 ms): perl/18476 minfault [_int_free+0x1df] => 0x0 (?.)
           156.216 ( 0.000 ms): perl/18476 minfault [Perl_sv_clear+0x123] => 0x0 (?.)
           156.221 ( 0.000 ms): perl/18476 minfault [Perl_sv_clear+0x123] => 0x0 (?.)
        [root@zoo /]#
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1403799268-1367-4-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1e28fe0a
    • S
      perf trace: Add support for pagefault tracing · 598d02c5
      Stanislav Fomichev 提交于
      This patch adds optional pagefault tracing support to 'perf trace'.
      
      Using -F/--pf option user can specify whether he wants minor, major or
      all pagefault events to be traced. This patch adds only live mode,
      record and replace will come in a separate patch.
      
      Example output:
      
        1756272.905 ( 0.000 ms): curl/5937 majfault [0x7fa7261978b6] => /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0@0x85288 (d.)
        1862866.036 ( 0.000 ms): wget/8460 majfault [__clear_user+0x3f] => 0x659cb4 (?k)
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1403799268-1367-3-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      598d02c5
    • S
      perf trace: Add perf_event parameter to tracepoint_handler · 0c82adcf
      Stanislav Fomichev 提交于
      It will be used by next pagefault tracing patches in the series.
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1403799268-1367-2-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0c82adcf
  3. 25 6月, 2014 1 次提交
  4. 20 6月, 2014 20 次提交
  5. 12 6月, 2014 6 次提交