1. 02 7月, 2012 2 次提交
    • D
      perf kvm: Fix regression with guest machine creation · 207b5792
      David Ahern 提交于
      Commit 743eb868 reworked when the
      machines were created. Prior to this commit guest machines could be
      created in perf_event__process_kernel_mmap() while processing kernel
      MMAP events. This commit assumes that the machines exist by the time
      perf_session_deliver_event is called (e.g., during processing of build
      id events) - which is not always correct.
      
      One example is the use of default guest args (--guestkallsyms and
      --guestmodules) for short times where no samples hit within a guest
      module. For this case no build id is added to the file header. No build
      id == no machine created. That leads to the next example -- the use of
      no-buildid (-B) on the record for all perf-kvm invocations. In both
      cases perf report dies with a SEGFAULT of the form:
      
      (gdb) bt
      0  0x000000000046dd7b in machine__mmap_name (self=0x0, bf=0x7fffffffbd20 "q\021", size=4096) at util/map.c:715
      1  0x0000000000444161 in perf_event__process_kernel_mmap (tool=0x7fffffffdd80, event=0x7ffff7fb4120, machine=0x0) at util/event.c:562
      2  0x0000000000444642 in perf_event__process_mmap (tool=0x7fffffffdd80, event=0x7ffff7fb4120, sample=0x7fffffffd210, machine=0x0)
          at util/event.c:668
      3  0x0000000000470e0b in perf_session_deliver_event (session=0x915ca0, event=0x7ffff7fb4120, sample=0x7fffffffd210, tool=0x7fffffffdd80,
          file_offset=8480) at util/session.c:979
      4  0x000000000047032e in flush_sample_queue (s=0x915ca0, tool=0x7fffffffdd80) at util/session.c:679
      5  0x0000000000471c8d in __perf_session__process_events (session=0x915ca0, data_offset=400, data_size=150448, file_size=150848, tool=
          0x7fffffffdd80) at util/session.c:1363
      6  0x0000000000471d42 in perf_session__process_events (self=0x915ca0, tool=0x7fffffffdd80) at util/session.c:1379
      7  0x000000000042484a in __cmd_report (rep=0x7fffffffdd80) at builtin-report.c:368
      8  0x0000000000425bf1 in cmd_report (argc=0, argv=0x915b00, prefix=0x0) at builtin-report.c:756
      9  0x0000000000438505 in __cmd_report (argc=4, argv=0x7fffffffe260) at builtin-kvm.c:84
      10 0x000000000043882a in cmd_kvm (argc=4, argv=0x7fffffffe260, prefix=0x0) at builtin-kvm.c:131
      11 0x00000000004152cd in run_builtin (p=0x7a54e8, argc=9, argv=0x7fffffffe260) at perf.c:273
      12 0x00000000004154c7 in handle_internal_command (argc=9, argv=0x7fffffffe260) at perf.c:345
      13 0x0000000000415613 in run_argv (argcp=0x7fffffffe14c, argv=0x7fffffffe140) at perf.c:389
      14 0x0000000000415899 in main (argc=9, argv=0x7fffffffe260) at perf.c:487
      
      Fix by allowing the machine to be created in perf_session_deliver_event.
      
      Tested with --guestmount option and default guest args, with and without
      -B arg on record for both and for short (10 seconds) and long (10
      minutes) windows.
      Reported-by: NPradeep Kumar Surisetty <psuriset@linux.vnet.ibm.com>
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Pradeep Kumar Surisetty <psuriset@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1341180697-64515-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      207b5792
    • D
      perf script: Fix format regression due to libtraceevent merge · 76a8349d
      David Ahern 提交于
      Consider the commands:
          perf record -e sched:sched_switch -fo /tmp/perf.data  -a -- sleep 1
          perf script -i /tmp/perf.data
      
      In v3.4 the output has the form (lines wrapped here)
          perf 29214 [005] 821043.582596: sched_switch:
      prev_comm=perf prev_pid=29214 prev_prio=120
      prev_state=S ==> next_comm=swapper/5 next_pid=0 next_prio=120
      
      In 3.5 that same line has become:
          perf 29214 [005] 821043.582596: sched_switch:
      <...>-29214 [005]     0.000000000: sched_switch:
      prev_comm=perf prev_pid=29214 prev_prio=120
      prev_state=S ==> next_comm=swapper/5 next_pid=0 next_prio=120
      
      Note the duplicates in the output -- pid, cpu, event name. With
      this patch the v3.4 output is restored:
          perf 29214 [005] 821043.582596: sched_switch:
      prev_comm=perf prev_pid=29214 prev_prio=120
      prev_state=S ==> next_comm=swapper/5 next_pid=0 next_prio=120
      
      v3:
      Remove that pesky newline too. Output now matches v3.4 (pre-libtracevent).
      
      v2:
      Change print_trace_event function local to perf per Steve's comments.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1339698977-68962-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      76a8349d
  2. 25 6月, 2012 1 次提交
  3. 23 6月, 2012 3 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 002b758b
      Linus Torvalds 提交于
      Pull Ceph fixes from Sage Weil:
       "There are a couple of fixes from Yan for bad pointer dereferences in
        the messenger code and when fiddling with page->private after page
        migration, a fix from Alex for a use-after-free in the osd client
        code, and a couple fixes for the message refcounting and shutdown
        ordering."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        libceph: flush msgr queue during mon_client shutdown
        rbd: Clear ceph_msg->bio_iter for retransmitted message
        libceph: use con get/put ops from osd_client
        libceph: osd_client: don't drop reply reference too early
        ceph: check PG_Private flag before accessing page->private
      002b758b
    • L
      Merge tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs · 369c4f54
      Linus Torvalds 提交于
      Pull XFS fixes from Ben Myers:
       - Fix stale data exposure with unwritten extents
       - Fix a warning in xfs_alloc_vextent with ODEBUG
       - Fix overallocation and alignment of pages for xfs_bufs
       - Fix a cursor leak
       - Fix a log hang
       - Fix a crash related to xfs_sync_worker
       - Rename xfs log structure from struct log to struct xlog so we can use
         crash dumps effectively
      
      * tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs:
        xfs: rename log structure to xlog
        xfs: shutdown xfs_sync_worker before the log
        xfs: Fix overallocation in xfs_buf_allocate_memory()
        xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
        xfs: check for stale inode before acquiring iflock on push
        xfs: fix debug_object WARN at xfs_alloc_vextent()
        xfs: xfs_vm_writepage clear iomap_valid when !buffer_uptodate (REV2)
      369c4f54
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a1163719
      Linus Torvalds 提交于
      Pull perf updates from Ingo Molnar.
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        ftrace: Make all inline tags also include notrace
        perf: Use css_tryget() to avoid propping up css refcount
        perf tools: Fix synthesizing tracepoint names from the perf.data headers
        perf stat: Fix default output file
        perf tools: Fix endianity swapping for adds_features bitmask
      a1163719
  4. 22 6月, 2012 8 次提交
  5. 21 6月, 2012 26 次提交