1. 27 Jul, 2010 5 commits
    • Arnaldo Carvalho de Melo's avatar
      perf ui: New hists tree widget · 0f0cbf7a
      Arnaldo Carvalho de Melo authored
      The stock newt checkbox tree widget we were using was not really
      suitable for hist entry + callchain browsing.
      
      The problems with it were manifold:
      
      - We needed to traverse the whole hist_entry rb_tree to add each entry +
        callchains beforehand.
      
      - No control over the colors used for each row
      
      So a new tree widget, based mostly on slang, was written.
      
      It extends the ui_browser class already used for annotate to allow the
      user to fold/unfold branches in the callchains tree, using extra fields
      in the symbol_map class that is embedded in hist_entry and
      callchain_node instances to store the folding state and when changing
      this state calculates the number of rows that are produced when showing
      a particular hist_entry instance.
      
      This greatly speeds up browsing as we don't have to upfront touch all
      the entries and only calculate callchain related operations when some
      callchain branch is actually unfolded.
      
      The memory footprint is also reduced as the data structure is not
      duplicated, just some extra fields for controling callchain state and to
      simplify the process of seeking thru entries (nr_rows, row_offset) were
      added.
      
      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>
      0f0cbf7a
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Show the scroll bar over the left window frame · 8d8c369f
      Arnaldo Carvalho de Melo authored
      So that we gain two columns and look more like classical (at least in
      TUIs) scroll bars bars.
      
      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>
      8d8c369f
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Consider the refreshed dimensions in ui_browser__show · 63160f73
      Arnaldo Carvalho de Melo authored
      When we call ui_browser__show we may have called
      ui_browser__refresh_dimensions to check if the maximum lenght for the
      contained entries changed, such as when zooming in and out DSOs or
      threads in the hist browser.
      
      For that to happen we must delete the old form, that will take care of
      deleting the vertical scrollbar, etc, and then recreate them, with the
      new dimensions.
      
      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>
      63160f73
    • Arnaldo Carvalho de Melo's avatar
      perf hist: Introduce routine to measure lenght of formatted entry · 06daaaba
      Arnaldo Carvalho de Melo authored
      Will be used to figure out the window width needed in the new tree
      widget.
      
      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>
      06daaaba
    • Arnaldo Carvalho de Melo's avatar
      perf ui: Restore SPACE as an alias to PGDN in annotate · b61b55ed
      Arnaldo Carvalho de Melo authored
      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>
      b61b55ed
  2. 23 Jul, 2010 3 commits
  3. 22 Jul, 2010 3 commits
    • Dan Carpenter's avatar
      trace: strlen() return doesn't account for the NULL · 24a461d5
      Dan Carpenter authored
      We need to add one to the strlen() return because of the NULL
      character.  The type->name here generally comes from the kernel and I
      don't think any of them come close to being MAX_TRACER_SIZE (100)
      characters long so this is basically a cleanup.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      LKML-Reference: <20100710100644.GV19184@bicker>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      24a461d5
    • David Daney's avatar
      tracing: Fix $mcount_regex for MIPS in recordmcount.pl · a484e54f
      David Daney authored
      I found this issue in a locally patched 2.6.32.x, current kernels have
      moved the offending code to an __init function which is skipped by
      recordmcount.pl, so the bug is not currently being exercised.
      However, I think the patch is still a good idea, to avoid future
      problems if _mcount were to ever have its address taken in normal
      code.
      
      This is what I originally saw:
      
          Although arch/mips/kernel/ftrace.c is built without -pg, and thus
          contains no calls to _mcount, it does use the address of _mcount
          in ftrace_make_nop().  This was causing relocations to be emitted
          for _mcount which recordmcount.pl erronously took to be _mcount
          call sites.  The result was that the text of ftrace_make_nop()
          would be patched with garbage leading to a system crash.
      
      In non-module code, all _mcount call sites will have R_MIPS_26
      relocations, so we restrict $mcount_regex to only match on these.
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Acked-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
      LKML-Reference: <1278712325-12050-1-git-send-email-ddaney@caviumnetworks.com>
      Cc: Li Hong <lihong.hi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Matt Fleming <matt@console-pimps.org>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a484e54f
    • Thomas Renninger's avatar
      x86 cpufreq, perf: Make trace_power_frequency cpufreq driver independent · 4c21adf2
      Thomas Renninger authored
      and fix the broken case if a core's frequency depends on others.
      
      trace_power_frequency was only implemented in a rather ungeneric
      way in acpi-cpufreq driver's target() function only.
      
      -> Move the call to trace_power_frequency to
         cpufreq.c:cpufreq_notify_transition() where CPUFREQ_POSTCHANGE
         notifier is triggered.
         This will support power frequency tracing by all cpufreq
         drivers.
      
      trace_power_frequency did not trace frequency changes correctly
      when the userspace governor was used or when CPU cores'
      frequency depend on each other.
      
      -> Moving this into the CPUFREQ_POSTCHANGE notifier and pass the cpu
         which gets switched automatically fixes this.
      
      Robert Schoene provided some important fixes on top of my
      initial quick shot version which are integrated in this patch:
      - Forgot some changes in power_end trace (TP_printk/variable names)
      - Variable dummy in power_end must now be cpu_id
      - Use static 64 bit variable instead of unsigned int for cpu_id
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Cc: davej@codemonkey.org.uk
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Acked-by: default avatarArjan van de Ven <arjan@infradead.org>
      Cc: Robert Schoene <robert.schoene@tu-dresden.de>
      Tested-by: default avatarRobert Schoene <robert.schoene@tu-dresden.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4c21adf2
  4. 21 Jul, 2010 17 commits
  5. 20 Jul, 2010 12 commits