1. 27 Aug, 2013 1 commit
  2. 26 Aug, 2013 14 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Add beautifier for mmap flags parm · 941557e0
      Arnaldo Carvalho de Melo authored
      [root@zoo ~]# perf trace -e mmap,mprotect sleep 1
           0.992 ( 0.015 ms): mmap(addr: 0, len: 4096, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS, fd: 4294967295, off: 0) = 0xa60be000
           1.108 ( 0.012 ms): mmap(addr: 0, len: 125100, prot: READ, flags: PRIVATE, fd: 3, off: 0  ) = 0xa609f000
           1.209 ( 0.014 ms): mmap(addr: 0x33c1600000, len: 3896312, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3, off: 0) = 0xc1600000
           1.232 ( 0.018 ms): mprotect(start: 0x33c17ad000, len: 2097152, prot: NONE                ) = 0
           1.255 ( 0.018 ms): mmap(addr: 0x33c19ad000, len: 24576, prot: READ|WRITE, flags: PRIVATE|DENYWRITE|FIXED, fd: 3, off: 1757184) = 0xc19ad000
           1.281 ( 0.011 ms): mmap(addr: 0x33c19b3000, len: 17400, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS|FIXED, fd: 4294967295, off: 0) = 0xc19b3000
           1.328 ( 0.008 ms): mmap(addr: 0, len: 4096, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS, fd: 4294967295, off: 0) = 0xa609e000
           1.346 ( 0.008 ms): mmap(addr: 0, len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS, fd: 4294967295, off: 0) = 0xa609c000
           1.443 ( 0.013 ms): mprotect(start: 0x606000, len: 4096, prot: READ                       ) = 0
           1.459 ( 0.011 ms): mprotect(start: 0x33c19ad000, len: 16384, prot: READ                  ) = 0
           1.477 ( 0.011 ms): mprotect(start: 0x33c1420000, len: 4096, prot: READ                   ) = 0
           1.855 ( 0.013 ms): mmap(addr: 0, len: 104789808, prot: READ, flags: PRIVATE, fd: 3, off: 0) = 0x9fcac000
      [root@zoo ~]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-q1ubhdd9wigxneam616ggdsn@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      941557e0
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Add beautifier for mmap prot parm · ae685380
      Arnaldo Carvalho de Melo authored
      [root@zoo ~]# perf trace -e mmap,mprotect sleep 1
           0.984 ( 0.015 ms): mmap(addr: 0, len: 4096, prot: READ|WRITE, flags: 34, fd: 4294967295, off: 0) = 0xd62ae000
           1.114 ( 0.016 ms): mmap(addr: 0, len: 125100, prot: READ, flags: 2, fd: 3, off: 0        ) = 0xd628f000
           1.252 ( 0.020 ms): mmap(addr: 0x33c1600000, len: 3896312, prot: EXEC|READ, flags: 2050, fd: 3, off: 0) = 0xc1600000
           1.282 ( 0.024 ms): mprotect(start: 0x33c17ad000, len: 2097152, prot: NONE                ) = 0
           1.315 ( 0.026 ms): mmap(addr: 0x33c19ad000, len: 24576, prot: READ|WRITE, flags: 2066, fd: 3, off: 1757184) = 0xc19ad000
           1.352 ( 0.017 ms): mmap(addr: 0x33c19b3000, len: 17400, prot: READ|WRITE, flags: 50, fd: 4294967295, off: 0) = 0xc19b3000
           1.415 ( 0.011 ms): mmap(addr: 0, len: 4096, prot: READ|WRITE, flags: 34, fd: 4294967295, off: 0) = 0xd628e000
           1.440 ( 0.011 ms): mmap(addr: 0, len: 8192, prot: READ|WRITE, flags: 34, fd: 4294967295, off: 0) = 0xd628c000
           1.569 ( 0.019 ms): mprotect(start: 0x606000, len: 4096, prot: READ                       ) = 0
           1.591 ( 0.017 ms): mprotect(start: 0x33c19ad000, len: 16384, prot: READ                  ) = 0
           1.616 ( 0.016 ms): mprotect(start: 0x33c1420000, len: 4096, prot: READ                   ) = 0
           2.105 ( 0.018 ms): mmap(addr: 0, len: 104789808, prot: READ, flags: 2, fd: 3, off: 0     ) = 0xcfe9c000
      [root@zoo ~]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-q1ubhdd9wigxneam616ggdsn@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae685380
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Allow overiding the formatting of syscall fields · beccb2b5
      Arnaldo Carvalho de Melo authored
      The mmap syscalls, for instance, don't have the FORMAT_IS_POINTER for
      its pointer arguments, override it.
      
      This also paves the way for more specialized argument beautifiers, like
      for mmap's prot and flags arguments.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-mm864hvhrpt39muxmmbtjasz@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      beccb2b5
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Add aliases to remaining syscalls of the sys_enter_newfoo · e5959683
      Arnaldo Carvalho de Melo authored
      Before:
      
        2392.918 ( 0.008 ms): 21581 lstat(arg0: 140734915488448, arg1: 140734915488240, arg2: 140734915488240, arg3: 3, arg4: 24426352, arg5: 98) = 0
      
      After:
      
        7408.087 ( 0.013 ms): 21969 lstat(filename: 0x7fff44b4bf20, statbuf: 0x7fff44b4be50               ) = 0
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-8nxaole8mb7zyopk47tdellj@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e5959683
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Allow printing syscall return values in hex · 04b34729
      Arnaldo Carvalho de Melo authored
      event_format->flags has a FIELD_IS_POINTER, but it is not set for
      the sys_exit 'ret' field in syscalls like mmap, so we need a way to
      ask for hex printing for pointer returns and keep things like 'read'
      returns printing in decimal.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-lfuveegw4od1t08n7bsmonrm@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      04b34729
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Simplify sys_exit return printing · da3c9a44
      Arnaldo Carvalho de Melo authored
      Avoiding multiple sc->fmt != NULL tests.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-w28d1o3uslden0k57653kda7@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      da3c9a44
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Introduce syscall arg formatters · 13d4ff3e
      Arnaldo Carvalho de Melo authored
      Starting with one for printing pointers in hexadecimal, using the
      information in the syscall tracepoint format.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-c4y4jy7qqkn8wsd8q6j1g7zh@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      13d4ff3e
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Hide sys_exit messages about syscall id = -1 · adaa18bf
      Arnaldo Carvalho de Melo authored
      That was reproduced via ftrace as described in this cset comment log,
      need to investigate further.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-n1i3m0vo6mgq3ddjj95sls2s@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      adaa18bf
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Add --verbose option · 7c304ee0
      Arnaldo Carvalho de Melo authored
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-ain6q4u8g3bpnh18yhw24v2x@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7c304ee0
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Support ! in -e expressions · b059efdf
      Arnaldo Carvalho de Melo authored
      So that we can ask for all but a set of syscalls to be traced.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-9j6hvap23qanyl96wx4mrj9k@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b059efdf
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Don't install scripting files files when disabled · 8c9dc528
      Arnaldo Carvalho de Melo authored
      No need to install perl or python files when the respective
      NO_LIBP{YTHON,ERL} define is set.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-c69d4jz08gb1zm2vpervva2q@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8c9dc528
    • David Ahern's avatar
      perf tools: Sample after exit loses thread correlation · 236a3bbd
      David Ahern authored
      Occassionally events (e.g., context-switch, sched tracepoints) are losing
      the conversion of sample data associated with a thread. For example:
      
      $ perf record -e sched:sched_switch -c 1 -a -- sleep 5
      $ perf script
      <selected events shown>
          ls 30482 [000] 1379727.583037: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
          ls 30482 [000] 1379727.586339: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
      :30482 30482 [000] 1379727.589462: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
      
      The last line lost the conversion from tid to comm. If you look at the events
      (perf script -D) you see why - a SAMPLE event is generated after the EXIT:
      
      0 1379727589449774 0x1540b0 [0x38]: PERF_RECORD_EXIT(30482:30482):(30482:30482)
      0 1379727589462497 0x1540e8 [0x80]: PERF_RECORD_SAMPLE(IP, 1): 30482/30482: 0xffffffff816416f1 period: 1 addr: 0
      ... thread: :30482:30482
      
      When perf processes the EXIT event the thread is moved to the dead_threads
      list. When the SAMPLE event is processed no thread exists for the pid so a new
      one is created by machine__findnew_thread.
      
      This patch address the problem by delaying the move to the dead_threads list
      until the tid is re-used (per Adrian's suggestion).
      
      With this patch we get the previous example shows:
      
        ls 30482 [000] 1379727.583037: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
        ls 30482 [000] 1379727.586339: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
        ls 30482 [000] 1379727.589462: sched:sched_switch: prev_comm=ls prev_pid=30482 ...
      
      and
      
        0 1379727589449774 0x1540b0 [0x38]: PERF_RECORD_EXIT(30482:30482):(30482:30482)
        0 1379727589462497 0x1540e8 [0x80]: PERF_RECORD_SAMPLE(IP, 1): 30482/30482: 0xffffffff816416f1 period: 1 addr: 0
        ... thread: ls:30482
      
      v4: per Arnaldo's request add dead flag to thread struct and set when task exits
      
      v3: re-do from a time based check to a delayed move to dead_threads list
      
      v2: Rebased to latest perf/core branch. Changed time comparison to use
          a macro which explicitly shows the time basis
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1376491767-84171-1-git-send-email-dsahern@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      236a3bbd
    • David Ahern's avatar
      perf trace: Make command line arguments consistent with perf-record · ac9be8ee
      David Ahern authored
      Common arguments like thread id, CPU list, mmap pages, etc should be
      consistent across perf commands.
      
      v3: Updated man page
      v2: rebased to latest core branch
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1377018945-21940-1-git-send-email-dsahern@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ac9be8ee
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Implement -o/--output filename · c24ff998
      Arnaldo Carvalho de Melo authored
      To output all 'trace' output to a filename, just like 'strace -ofile'
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      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-6q1homkwoayhmoq64y5vhel6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c24ff998
  3. 16 Aug, 2013 10 commits
  4. 15 Aug, 2013 3 commits
  5. 14 Aug, 2013 6 commits
  6. 12 Aug, 2013 6 commits