1. 29 10月, 2014 32 次提交
  2. 23 10月, 2014 1 次提交
  3. 18 10月, 2014 2 次提交
    • J
      perf script: Add period as a default output column · e8564b71
      Jiri Olsa 提交于
      Adding period as a default output column in script command fo hardware,
      software and raw events.
      
      If PERF_SAMPLE_PERIOD sample type is defined in perf.data, following
      will be displayed in perf script output:
      
        $ perf script
                    ls  8034 57477.887209:     250000 task-clock:  ffffffff81361d72 memset ([kernel.kallsyms])
                    ls  8034 57477.887464:     250000 task-clock:  ffffffff816f6d92 _raw_spin_unlock_irqrestore ([kernel.kallsyms])
                    ls  8034 57477.887708:     250000 task-clock:  ffffffff811a94f0 do_munmap ([kernel.kallsyms])
                    ls  8034 57477.887959:     250000 task-clock:        34080916c6 get_next_seq (/usr/lib64/libc-2.17.so)
                    ls  8034 57477.888208:     250000 task-clock:        3408079230 _IO_doallocbuf (/usr/lib64/libc-2.17.so)
                    ls  8034 57477.888717:     250000 task-clock:  ffffffff814242c8 n_tty_write ([kernel.kallsyms])
                    ls  8034 57477.889285:     250000 task-clock:        3408076402 fwrite_unlocked (/usr/lib64/libc-2.17.so)
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: "Jen-Cheng(Tommy) Huang" <tommy24@gatech.edu>
      Cc: Andi Kleen <andi@firstfloor.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: Jen-Cheng(Tommy) Huang <tommy24@gatech.edu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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/1408977943-16594-10-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e8564b71
    • J
      perf script: Add period data column · 535aeaae
      Jiri Olsa 提交于
      Adding period data column to be displayed in perf script.  It's possible
      to get period values using -f option, like:
      
        $ perf script -f comm,tid,time,period,ip,sym,dso
                :26019 26019 52414.329088:       3707  ffffffff8105443a native_write_msr_safe ([kernel.kallsyms])
                :26019 26019 52414.329088:         44  ffffffff8105443a native_write_msr_safe ([kernel.kallsyms])
                :26019 26019 52414.329093:       1987  ffffffff8105443a native_write_msr_safe ([kernel.kallsyms])
                :26019 26019 52414.329093:          6  ffffffff8105443a native_write_msr_safe ([kernel.kallsyms])
                    ls 26019 52414.329442:     537558        3407c0639c _dl_map_object_from_fd (/usr/lib64/ld-2.17.so)
                    ls 26019 52414.329442:       2099        3407c0639c _dl_map_object_from_fd (/usr/lib64/ld-2.17.so)
                    ls 26019 52414.330181:    1242100        34080917bb get_next_seq (/usr/lib64/libc-2.17.so)
                    ls 26019 52414.330181:       3774        34080917bb get_next_seq (/usr/lib64/libc-2.17.so)
                    ls 26019 52414.331427:    1083662  ffffffff810c7dc2 update_curr ([kernel.kallsyms])
                    ls 26019 52414.331427:        360  ffffffff810c7dc2 update_curr ([kernel.kallsyms])
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Cc: "Jen-Cheng(Tommy) Huang" <tommy24@gatech.edu>
      Cc: Andi Kleen <andi@firstfloor.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: Jen-Cheng(Tommy) Huang <tommy24@gatech.edu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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/1408977943-16594-9-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      535aeaae
  4. 17 10月, 2014 3 次提交
  5. 16 10月, 2014 2 次提交
    • A
      perf kvm stat live: Enable events copying · 673d659f
      Alexander Yarygin 提交于
      Process of analyzing events caused by 2 functions: mmap_read() and
      finished_round().
      
      During mmap_read(), perf receives events from shared memory, queues
      their pointers for further processing in finished_round() and notifies
      the kernel that the events have been processed.
      
      By the time when finished_round() is invoked, queued events can be
      overwritten by the kernel, so the finished_round() occurs on potentially
      corrupted memory.
      
      Since there is no place where the event can be safely consumed, let's
      copy events when queueing.
      Signed-off-by: NAlexander Yarygin <yarygin@linux.vnet.ibm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David Ahern <dsahern@gmail.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.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/1412347212-28237-3-git-send-email-yarygin@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      673d659f
    • A
      perf session: Add option to copy events when queueing · 54bf53b1
      Alexander Yarygin 提交于
      When processing events the session code has an ordered samples queue
      which is used to time-sort events coming in across multiple mmaps. At a
      later point in time samples on the queue are flushed up to some
      timestamp at which point the event is actually processed.
      
      When analyzing events live (ie., record/analysis path in the same
      command) there is a race that leads to corrupted events and parse errors
      which cause perf to terminate. The problem is that when the event is
      placed in the ordered samples queue it is only a reference to the event
      which is really sitting in the mmap buffer. Even though the event is
      queued for later processing the mmap tail pointer is updated which
      indicates to the kernel that the event has been processed. The race is
      flushing the event from the queue before it gets overwritten by some
      other event. For commands trying to process events live (versus just
      writing to a file) and processing a high rate of events this leads to
      parse failures and perf terminates.
      
      Examples hitting this problem are 'perf kvm stat live', especially with
      nested VMs which generate 100,000+ traces per second, and a command
      processing scheduling events with a high rate of context switching --
      e.g., running 'perf bench sched pipe'.
      
      This patch offers live commands an option to copy the event when it is
      placed in the ordered samples queue.
      
      Based on a patch from David Ahern <dsahern@gmail.com>
      Signed-off-by: NAlexander Yarygin <yarygin@linux.vnet.ibm.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David Ahern <dsahern@gmail.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.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/1412347212-28237-2-git-send-email-yarygin@linux.vnet.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      54bf53b1