1. 06 Aug, 2010 3 commits
  2. 05 Aug, 2010 13 commits
  3. 04 Aug, 2010 4 commits
  4. 03 Aug, 2010 3 commits
  5. 02 Aug, 2010 5 commits
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Don't keep unreferenced maps when unmaps are detected · 0a1eae39
      Arnaldo Carvalho de Melo authored
      For a file with:
      
      [root@emilia linux-2.6-tip]# perf report -D -fi allmodconfig-j32.perf.data | grep events:
           TOTAL events:      36933
            MMAP events:       9056
            LOST events:          0
            COMM events:       1702
            EXIT events:       1887
        THROTTLE events:          8
      UNTHROTTLE events:          8
            FORK events:       1894
            READ events:          0
          SAMPLE events:      22378
            ATTR events:          0
      EVENT_TYPE events:          0
      TRACING_DATA events:          0
        BUILD_ID events:          0
      [root@emilia linux-2.6-tip]#
      
      Testing with valgrind and making perf_session__delete() a nop, so that
      we can notice how many maps were actually deleted due to not having any
      samples on it:
      
      ==== HEAP SUMMARY:
      
      Before:
      
      ==10339==     in use at exit: 8,909,997 bytes in 68,690 blocks
      ==10339==   total heap usage: 78,696 allocs, 10,007 frees, 11,925,853 bytes allocated
      
      After:
      
      ==10506==     in use at exit: 8,902,605 bytes in 68,606 blocks
      ==10506==   total heap usage: 78,696 allocs, 10,091 frees, 11,925,853 bytes allocated
      
      I.e. just 84 detected unmaps with no hits out of 9056 for this workload,
      not much, but in some other long running workload this may save more
      bytes.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0a1eae39
    • Arnaldo Carvalho de Melo's avatar
      perf session: Invalidate last_match when removing threads from rb_tree · 70597f21
      Arnaldo Carvalho de Melo authored
      If we receive two PERF_RECORD_EXIT for the same thread, we can end up
      reusing session->last_match and trying to remove the thread twice from
      the rb_tree, causing a segfault, so invalidade last_match in
      perf_session__remove_thread.
      
      Receiving two PERF_RECORD_EXIT for the same thread is a bug, but its a
      harmless one if we make the tool more robust, like this patch does.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      70597f21
    • Arnaldo Carvalho de Melo's avatar
      perf session: Free the ref_reloc_sym memory at the right place · 076c6e45
      Arnaldo Carvalho de Melo authored
      Which is at perf_session__destroy_kernel_maps, counterpart to the
      perf_session__create_kernel_maps where the kmap structure is located, just
      after the vmlinux_maps.
      
      Make it also check if the kernel maps were actually created, which may not
      be the case if, for instance, perf_session__new can't complete due to
      permission problems in, for instance, a 'perf report' case, when a
      segfault will take place, that is how this was noticed.
      
      The problem was introduced in d65a458b, thus post .35.
      
      This also adds code to release guest machines as them are also created
      in perf_session__create_kernel_maps, so should be deleted on this newly
      introduced counterpart, perf_session__destroy_kernel_maps.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      076c6e45
    • Ingo Molnar's avatar
      Merge commit 'v2.6.35' into perf/core · 3772b734
      Ingo Molnar authored
      Conflicts:
      	tools/perf/Makefile
      	tools/perf/util/hist.c
      
      Merge reason: Resolve the conflicts and update to latest upstream.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3772b734
    • Ingo Molnar's avatar
      Merge branch 'perf/core' of... · 9fc3af46
      Ingo Molnar authored
      Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core
      9fc3af46
  6. 01 Aug, 2010 12 commits
    • Marcin Slusarz's avatar
      x86,mmiotrace: Add support for tracing STOS instruction · cc05152a
      Marcin Slusarz authored
      Add support for stos access tracing with mmiotrace.
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: default avatarPekka Paalanen <pq@iki.fi>
      Cc: Nouveau <nouveau@lists.freedesktop.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20100731205101.GA5860@joi.lan>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      cc05152a
    • Frederic Weisbecker's avatar
      perf, sched migration: Librarize task states and event headers helpers · 1b0ff06e
      Frederic Weisbecker authored
      Librarize the task state and event headers helpers as they can
      be generally useful.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      1b0ff06e
    • Frederic Weisbecker's avatar
      perf, sched migration: Librarize the GUI class · df92b408
      Frederic Weisbecker authored
      Export the GUI facility in the common library path. It is
      going to be useful for other scheduler views.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      df92b408
    • Frederic Weisbecker's avatar
      perf, sched migration: Make the GUI class client agnostic · 699b6d92
      Frederic Weisbecker authored
      Make the perf migration GUI generic so that it can be reused for
      other kinds of trace painting. No more notion of CPUs or runqueue
      from the GUI class, it's now used as a library by the trace parser.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      699b6d92
    • Frederic Weisbecker's avatar
      perf, sched migration: Make it vertically scrollable · 70d815a3
      Frederic Weisbecker authored
      With scheduler traces covering more than two cpus, rectangles
      of the CPUs 3 and more are not visibles.
      
      This makes the vertical navigation scrollable so that all of the
      CPUs rectangles are available.
      
      We also want to be able to zoom vertically, so that we can fit at
      best the screen with CPU rectangles, but that's for later.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      70d815a3
    • Nikhil Rao's avatar
      perf, sched migration: Parameterize cpu height and spacing · 0cddf56a
      Nikhil Rao authored
      Without vertical zoom, it is not possible to see all CPUs in a trace
      taken on a larger machine. This patch parameterizes the height and
      spacing of CPUs so that you can fit more cpus into the screen.
      
      Ideally we should dynamically size/space the CPU rectangles with some
      minimum threshold. Until then, this patch is a stop-gap.
      Signed-off-by: default avatarNikhil Rao <ncrao@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      0cddf56a
    • Nikhil Rao's avatar
      perf, sched migration: Fix key bindings · be6d9476
      Nikhil Rao authored
      EVT_KEY_DOWN and EVT_LEFT_DOWN events are not bound to the RootFrame
      event handler. As a result, zoom/scroll via keyboard events do not
      work. This patch adds the missing bindings.
      Signed-off-by: default avatarNikhil Rao <ncrao@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      be6d9476
    • Frederic Weisbecker's avatar
      perf, sched migration: Ignore unhandled task states · 207f90fc
      Frederic Weisbecker authored
      Stop printing an error message when we don't have the letter
      for a given task state. All we need to know is if the task is
      in the TASK_RUNNING state.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      207f90fc
    • Frederic Weisbecker's avatar
      perf, sched migration: Handle ignored migrate out events · 749e5074
      Frederic Weisbecker authored
      Migrate out events may happen on tasks that are not in the
      runqueue, for example this is the case for tasks that are
      sleeping. In this case, we don't want to log the migrate out
      event in the source runqueue because the task is not eventually
      in the runqueue and we have already logged its sleep event.
      
      This fixes timeslices that spuriously propagate a sleep event
      from the previous timeslice.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      749e5074
    • Frederic Weisbecker's avatar
      perf: New migration tool overview · 880d22f2
      Frederic Weisbecker authored
      This brings a GUI tool that displays an overview of the load
      of tasks proportion in each CPUs.
      
      The CPUs forward progress is cut in timeslices. A new timeslice
      is created for every runqueue event: a task gets pushed out or
      pulled in the runqueue.
      
      For each timeslice, every CPUs rectangle is colored with a red
      power that describes the local load against the total load.
      This more red is the rectangle, the higher is the given CPU load.
      This load is the number of tasks running on the CPU, without
      any distinction against the scheduler policy of the tasks, for
      now.
      
      Also for each timeslice, the event origin is depicted on the
      CPUs that triggered it using a thin colored line on top of the
      rectangle timeslice.
      
      These events are:
      
      * sleep: a task went to sleep and has then been pulled out the
        runqueue. The origin color in the thin line is dark blue.
      
      * wake up: a task woke up and has then been pushed in the
        runqueue. The origin color is yellow.
      
      * wake up new: a new task woke up and has then been pushed in the
        runqueue. The origin color is green.
      
      * migrate in: a task migrated in the runqueue due to a load
        balancing operation. The origin color is violet.
      
      * migrate out: reverse of the previous one. Migrate in events
        usually have paired migrate out events in another runqueue.
        The origin color is light blue.
      
      Clicking on a timeslice provides the runqueue event details
      and the runqueue state.
      
      The CPU rectangles can be navigated using the usual arrow
      controls. Horizontal zooming in/out is possible with the
      "+" and "-" buttons.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Cc: Pierre Tardy <tardyp@gmail.com>
      Cc: Nikhil Rao <ncrao@google.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      880d22f2
    • Frederic Weisbecker's avatar
      tracing: Drop cpparg() macro · 819ce45a
      Frederic Weisbecker authored
      Drop the cpparg() macro that wraps CPP parameters. We already have
      the PARAM() macro for that, no need to have several versions.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      819ce45a
    • Frederic Weisbecker's avatar
      perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call · 669336e4
      Frederic Weisbecker authored
      We use synchronize_sched() to ensure a tracepoint won't be called
      while/after we release the perf buffers it references.
      
      But the tracepoint API has its own API for that:
      tracepoint_synchronize_unregister(). Use it instead as it's
      self-explanatory and eases maintainance.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      669336e4