1. 30 Jul, 2010 6 commits
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Release thread resources on PERF_RECORD_EXIT · 591765fd
      Arnaldo Carvalho de Melo authored
      For long running sessions with many threads with short lifetimes the
      amount of memory that the buildid process takes is too much.
      
      Since we don't have hist_entries that may be pointing to them, we can
      just release the resources associated with each thread when the exit
      (PERF_RECORD_EXIT) event is received.
      
      For normal processing we need to annotate maps with hits, and thus
      hist_entries pointing to it and drop the ones that had none. Will be
      done in a followup patch.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      591765fd
    • Srikar Dronamraju's avatar
      perf probe: Rename common fields/functions from kprobe to probe. · 0e60836b
      Srikar Dronamraju authored
      As a precursor for perf to support uprobes, rename fields/functions
      that had kprobe in their name but can be shared across perf-kprobes
      and perf-uprobes to probe.
      
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mark Wielaard <mjw@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Naren A Devaiah <naren.devaiah@in.ibm.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20100729141351.GG21723@linux.vnet.ibm.com>
      Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0e60836b
    • Arnaldo Carvalho de Melo's avatar
      perf tui: Make CTRL+Z suspend perf · 73ae8f85
      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>
      73ae8f85
    • Dave Martin's avatar
      perf symbols: Improve debug image search when loading symbols · 6da80ce8
      Dave Martin authored
      Changes:
      	* Simplification of the main search loop on dso__load()
      	* Replace the search with a 2-pass search:
      		* First, try to find an image with a proper symtab.
      		* Second, repeat the search, accepting dynsym.
      
      A second scan should only ever happen when needed debug images are
      missing from the buildid cache or stale, i.e., when the cache is out of
      sync.
      
      Currently, the second scan also happens when using separated debug
      images, since the caching logic doesn't currently know how to cache
      those.  Improvements to the cache behaviour ought to solve that.
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6da80ce8
    • Dave Martin's avatar
      perf tools: remove extra build-id check factored into dso__load · 8b1389ef
      Dave Martin authored
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8b1389ef
    • Dave Martin's avatar
      perf tools: Factor out buildid reading and make it implicit in dso__load · 21916c38
      Dave Martin authored
      If we have a buildid, then we never want to load an image which has no buildid,
      or which has a different buildid, so it makes sense for the check to be built
      into dso__load and not done separately.  This is fine for old distros which
      don't use buildid at all since we do no check in that case.
      
      This refactoring also alleviates some subtle race condition issues by not
      opening ELF images twice to check the buildid and then load the symbols, which
      could lead to weirdness if an image is replaced under our feet.
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      21916c38
  2. 29 Jul, 2010 2 commits
  3. 28 Jul, 2010 1 commit
  4. 27 Jul, 2010 7 commits
    • Dave Martin's avatar
      perf tools: Remove unneeded code for tracking the cwd in perf sessions · 88ca895d
      Dave Martin authored
      Tidy-up patch to remove some code and struct perf_session data members
      which are no longer needed due to the previous patch: "perf tools: Don't
      abbreviate file paths relative to the cwd".
      
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      88ca895d
    • Dave Martin's avatar
      perf report: Don't abbreviate file paths relative to the cwd · 361d1346
      Dave Martin authored
      This avoids around some problems where the full path is executables and DSOs it
      needed for finding debug symbols on platforms with separated debug symbol files
      such as Ubuntu.  This is simpler than tracking an extra name for each image.
      
      The only impact should be that paths in verbose output from the perf tools
      become absolute, instead of relative to .
      
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      361d1346
    • 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
  5. 23 Jul, 2010 3 commits
  6. 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
  7. 21 Jul, 2010 17 commits
  8. 20 Jul, 2010 1 commit