1. 16 Jul, 2014 8 commits
  2. 09 Jul, 2014 4 commits
  3. 08 Jul, 2014 3 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Fix build on 32-bit systems · 4414a3c5
      Arnaldo Carvalho de Melo authored
          CC       /tmp/build/perf/builtin-trace.o
        builtin-trace.c: In function 'print_location':
        builtin-trace.c:1792:4: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'u64' [-Werror=format]
        builtin-trace.c:1794:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u64' [-Werror=format]
        builtin-trace.c:1796:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'u64' [-Werror=format]
        cc1: all warnings being treated as errors
        make[1]: *** [/tmp/build/perf/builtin-trace.o] Error 1
        make[1]: *** Waiting for unfinished jobs....
        make: *** [install-bin] Error 2
        make: Leaving directory `/home/acme/git/linux/tools/perf'
      
        acme@linux-goap:~/git/linux> uname -a
        Linux linux-goap 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) i686 i686 i386 GNU/Linux
      
      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: Stanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-843p3aqbw531eqiu2hah8o9p@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4414a3c5
    • Stanislav Fomichev's avatar
      perf trace: Add pagefault statistics · a2ea67d7
      Stanislav Fomichev authored
      'perf trace' can show summary of events using -S option. This commit
      also reports number of major/minor pagefault events in this summary.
      
      $ perf trace -s --pf all -- sleep 1
      
       Summary of events:
      
       sleep (18604), 275 events, 99.6%, 197 minfaults, 0.000 msec
      
         syscall            calls      min       avg       max      stddev
                                     (msec)    (msec)    (msec)        (%)
         --------------- -------- --------- --------- ---------     ------
         read                   2     0.000     0.001     0.002    100.00%
         open                   3     0.004     0.005     0.007     21.13%
         close                  3     0.001     0.001     0.001      1.37%
         fstat                  3     0.001     0.002     0.002     10.66%
         mmap                   8     0.002     0.004     0.006     10.69%
         mprotect               4     0.003     0.005     0.008     24.68%
         munmap                 1     0.005     0.005     0.005      0.00%
         brk                    3     0.001     0.002     0.003     28.08%
         access                 3     0.002     0.003     0.005     24.48%
         nanosleep              1  1000.747  1000.747  1000.747      0.00%
         execve                 8     0.000     0.033     0.246     91.00%
         arch_prctl             1     0.001     0.001     0.001      0.00%
      Signed-off-by: default avatarStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1404842716-19190-1-git-send-email-stfomichev@yandex-team.ruSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a2ea67d7
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Suggest using -f to override perf.data file ownership message · 071266bf
      Arnaldo Carvalho de Melo authored
        # id
        uid=0(root) gid=0(root) groups=0(root)
        # ls -la perf.data
        -rw-------. 1 acme acme 20720 Jul  8 11:35 perf.data
      
      Previously:
      
        # perf report
        file perf.data not owned by current user or root
      
      Now:
      
        # perf report
        File perf.data not owned by current user or root (use -f to override)
      Suggested-by: default avatarIngo Molnar <mingo@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-0j2wuuegnhv3gljbil8ld6kx@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      071266bf
  4. 07 Jul, 2014 13 commits
  5. 05 Jul, 2014 5 commits
  6. 27 Jun, 2014 5 commits
  7. 26 Jun, 2014 2 commits
    • Stanislav Fomichev's avatar
      perf trace: Add possibility to switch off syscall events · e281a960
      Stanislav Fomichev authored
      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: default avatarStanislav 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e281a960
    • Stanislav Fomichev's avatar
      perf trace: Add pagefaults record and replay support · 1e28fe0a
      Stanislav Fomichev authored
      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: default avatarStanislav 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1e28fe0a