aboutsummaryrefslogtreecommitdiffstats
path: root/tools (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-02perf, sched migration: Parameterize cpu height and spacingNikhil Rao1-9/+14
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: Nikhil 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: Frederic Weisbecker <fweisbec@gmail.com>
2010-08-02perf, sched migration: Fix key bindingsNikhil Rao1-0/+2
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: Nikhil 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: Frederic Weisbecker <fweisbec@gmail.com>
2010-08-02perf, sched migration: Ignore unhandled task statesFrederic Weisbecker1-2/+1
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: Frederic 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>
2010-08-02perf, sched migration: Handle ignored migrate out eventsFrederic Weisbecker1-1/+4
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: Frederic 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>
2010-08-02perf: New migration tool overviewFrederic Weisbecker3-0/+639
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: Frederic 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>
2010-07-31Merge branches 'at91', 'ep93xx', 'kexec', 'iop', 'lmb', 'nomadik', 'nuc', 'pl', 'spear' and 'versatile' into develRussell King2-0/+68
2010-07-30perf tools: Release session and symbol resources on exitArnaldo Carvalho de Melo7-3/+70
So that we reduce the noise when looking for leaks using tools such as valgrind. 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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tools: Release thread resources on PERF_RECORD_EXITArnaldo Carvalho de Melo5-0/+61
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf probe: Rename common fields/functions from kprobe to probe.Srikar Dronamraju5-106/+101
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: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tui: Make CTRL+Z suspend perfArnaldo Carvalho de Melo1-0/+9
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf symbols: Improve debug image search when loading symbolsDave Martin1-35/+61
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: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tools: remove extra build-id check factored into dso__loadDave Martin1-26/+2
Signed-off-by: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-30perf tools: Factor out buildid reading and make it implicit in dso__loadDave Martin1-33/+47
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: Dave Martin <dave.martin@linaro.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-29perf symbols: Precisely specify if dso->{long,short}_name should be freedArnaldo Carvalho de Melo3-2/+8
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-29perf record: Release resources at exitArnaldo Carvalho de Melo1-6/+26
So that we can reduce the noise on valgrind when looking for memory leaks. 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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-28perf man pages: Fix cut'n'paste errorArnaldo Carvalho de Melo1-4/+4
We remove files _from_ the cache. 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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf tools: Remove unneeded code for tracking the cwd in perf sessionsDave Martin5-29/+2
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: Dave Martin <dave.martin@linaro.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf report: Don't abbreviate file paths relative to the cwdDave Martin3-23/+3
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: Dave Martin <dave.martin@linaro.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: New hists tree widgetArnaldo Carvalho de Melo4-311/+678
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Show the scroll bar over the left window frameArnaldo Carvalho de Melo1-2/+2
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Consider the refreshed dimensions in ui_browser__showArnaldo Carvalho de Melo1-2/+4
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf hist: Introduce routine to measure lenght of formatted entryArnaldo Carvalho de Melo2-0/+30
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27perf ui: Restore SPACE as an alias to PGDN in annotateArnaldo Carvalho de Melo1-0/+1
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-27tools/firewire: nosy-dump: increment program versionStefan Richter1-2/+2
Since version 0.3 from Kristian's repository, there should actually be no change in functionality except for the x86-64 fix. Nevertheless, make it distinct from the original nosy-dump --- just in case and also because of potential future changes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: remove unused codeStefan Richter1-56/+49
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: use linux/firewire-constants.hStefan Richter3-31/+11
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: break up a deeply nested functionStefan Richter1-113/+132
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: make some symbols static or constStefan Richter1-27/+29
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: change to kernel coding styleStefan Richter4-1192/+1139
This changes only - whitespace - C99 initializers - comment style - order of #includes - if { } else { } bracing Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: work around segfault in decode_fcpStefan Richter1-0/+5
If I run "nosy-dump --view=transaction" with my camcorder on battery instead of mains, it segfaults very quickly because of !t->request. Perhaps this is because of increased likelyhood of incomplete transactions (ack_busy when host writes to camcorder's FCP_Request) and a bug deeper in nosy-dump's transaction housekeeping. This is a quick workaround to get me going. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: nosy-dump: fix it on x86-64Stefan Richter3-209/+112
Replace 'unsigned long' and the (unaffected) 'unsigned int' by uint32_t if they represent quadlets. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-07-27tools/firewire: add userspace front-end of nosyStefan Richter5-0/+1649
This adds nosy-dump, the userspace part of nosy, the IEEE 1394 traffic sniffer for Texas Instruments PCILynx/ PCILynx2 based cards. Author is Kristian Høgsberg. The files added here are taken from git://anongit.freedesktop.org/~krh/nosy commit ee29be97 (2009-11-10) with the following changes by Stefan Richter: - Parts pertaining to the kernel module removed from Makefile. - dist target removed from the Makefile. - Mentioned nosy-dump in the Kconfig help to nosy's kernel component. - Add copyright notice to nosy-dump.c. This is a duplicate of the respective notice in the kernel component nosy.c except for a time span of 2002 - 2006, according to Kristian's git log. "git shortlog decode-fcp.c list.h nosy-dump.[ch]" from nosy's git repository: Jonathan Woithe (1): Save logs on Ctrl-C Kristian Høgsberg (11): Pull over nosy from mercurial repo. Remove some fields from default view, add logging feature. Use infinite time out for poll(), mark more detail fields. Fix byte ordering macro. Add decoding of iso data and lock packets. Add flag to indicate data length field. Add cycle start packet decoding, add --iso and --cycle-start flags. Distinguish between phy-packets and 0-length iso data. Fix transaction and stats view. Add simple AV/C decoder. Don't break down on big payloads. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@bitplanet.net>
2010-07-23Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tipLinus Torvalds3-33/+53
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not available perf annotate: Fix handling of goto labels that are valid hex numbers tracing: Properly align linker defined symbols perf symbols: Fix directory descriptor leaking perf: Fix various display bugs with parent filtering
2010-07-23perf sort: Make column width code per hists instanceArnaldo Carvalho de Melo8-79/+140
They were globals, and since we support multiple hists and sessions at the same time, it doesn't make sense to calculate those values considereing all symbols in all sessions. 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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-23perf hists: Mark entries filtered by parentArnaldo Carvalho de Melo1-5/+16
And don't consider them in hists__inc_nr_entries. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-22perf tools: Fix fallback to cplus_demangle() when bfd_demangle() is not availableConny Seidel1-19/+21
make version 3.80 doesn't support "else ifdef" on the same line, also it doesn't support unindented nested constructs. Build fails with: Makefile:608: Extraneous text after `else' directive Makefile:611: *** only one `else' per conditional. Stop. This patch fixes the build for make 3.80. Cc: Ingo Molnar <mingo@elte.hu>, Cc: Borislav Petkov <borislav.petkov@amd.com> LKML-Reference: <1278430783-17259-1-git-send-email-conny.seidel@amd.com> Signed-off-by: Conny Seidel <conny.seidel@amd.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-22perf annotate: Fix handling of goto labels that are valid hex numbersArnaldo Carvalho de Melo1-2/+6
When parsing the objdump disassembly output we can have goto labels that are valid hex numbers and thus get confused with lines with machine code. Handle the common case of a label that has nothing after it and other cases where there is just source code by validating the resulting "ip". It is still possible that we find goto labels that are in the function address range, but only if they are located before the real address we should be OK. A change in the objdump output to have a clear marker separating addresses from the disassembly would come handy, but we would still have to deal with older versions. Reported-by: Gleb Natapov <gleb@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <20100722170541.GF17631@ghostprotocols.net> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-22x86 cpufreq, perf: Make trace_power_frequency cpufreq driver independentThomas Renninger1-5/+6
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: Thomas Renninger <trenn@suse.de> Cc: davej@codemonkey.org.uk Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Dave Jones <davej@codemonkey.org.uk> Acked-by: Arjan van de Ven <arjan@infradead.org> Cc: Robert Schoene <robert.schoene@tu-dresden.de> Tested-by: Robert Schoene <robert.schoene@tu-dresden.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2010-07-21Merge branch 'linus' into perf/coreIngo Molnar6-27/+79
Merge reason: Pick up the latest perf fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-07-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds2-0/+47
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: math-emu: correct test for downshifting fraction in _FP_FROM_INT() perf: Add DWARF register lookup for sparc MAINTAINERS: Add SBUS driver path to sparc entry. drivers/sbus: Remove unnecessary casts of private_data sparc: remove homegrown L1_CACHE_ALIGN macro sparc64: fix the build error due to smp_kgdb_capture_client() sparc64: Fix maybe_change_configuration() PCR setting. arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference sparc64: Update defconfig. sunsu: Fix use after free in su_remove(). sunserial: Don't call add_preferred_console() when console= is specified. sparc32: Kill none_mask, it's bogus.
2010-07-17perf hists: Factor out duplicated codeArnaldo Carvalho de Melo1-18/+18
Introducing hists__remove_entry_filter. 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> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-17perf ui: Make ui_browser__run exit on unhandled hot keysArnaldo Carvalho de Melo1-5/+1
Right now ENTER doesn't always exits the newt tree widget, as it is used for expanding/collapsing branches, but with the new tree widget being developed we need to regain control to handle it, expanding/collapsing branches. In fact its really up to the ui_browser user to state what extra keys should stop ui_browser__run, and it should handle just the ones needed for basic browsing. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-17perf ui: Make END go to the last entry, not the top of the last pageArnaldo Carvalho de Melo1-4/+4
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: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-16perf symbols: Fix directory descriptor leakingGui Jianfeng1-7/+10
When I ran "perf kvm ... top", I encountered the following error output. Error: perfcounter syscall returned with -1 (Too many open files) Fatal: No CONFIG_PERF_EVENTS=y kernel support configured? Looking into perf, I found perf opens too many directories at initialization time, but forgets to close them. Here is the fix. LKML-Reference: <4C230362.5080704@cn.fujitsu.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-16perf probe: Fix the logic of die_compare_nameMasami Hiramatsu1-7/+7
Invert the return value of die_compare_name(), because it returns a 'bool' result which should be expeced true if the die's name is same as compared string. LKML-Reference: <4C36EBED.1000006@hitachi.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-16perf probe: Support comp_dir to find an absolute source pathMasami Hiramatsu3-12/+44
Gcc generates DW_AT_comp_dir and stores relative source path if building kernel without O= option. In that case, perf probe --line sometimes doesn't work without --source option, because it tries to access relative source path. This adds DW_AT_comp_dir support to perf probe for finding an absolute source path when no --source option. LKML-Reference: <4C36EBE7.3060802@hitachi.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-16perf probe: Fix error message if get_real_path() failedMasami Hiramatsu2-56/+64
Perf probe -L shows incorrect error message (Dwarf error) if it fails to find source file. This can confuse users. # ./perf probe -s /nowhere -L vfs_read Debuginfo analysis failed. (-2) Error: Failed to show lines. (-2) With this patch, it shows correct message. # ./perf probe -s /nowhere -L vfs_read Failed to find source file. (-2) Error: Failed to show lines. (-2) LKML-Reference: <4C36EBDB.4020308@hitachi.com> Cc: Chase Douglas <chase.douglas@canonical.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-07-16perf: Fix various display bugs with parent filteringFrederic Weisbecker1-5/+16
Hists that have been filtered, because they don't have callchains matching the parent filter, won't be printed. As such, hist_entry__snprintf() returns 0 for them, but we don't control this value and we always print the buffer, which might be untouched and then only made of random stack garbage. Not only does it paint the screen with barf, it also prints the callchains for these hists, even though they have been filtered, since the hist has been filtered as well. We need to check the return value of hist_entry__snprintf() and ignore the hist if it is 0, which means it didn't get any callchain matching the parent filter. This fixes the barf and the undesired callchains. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Frederic 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>
2010-07-14perf: Add DWARF register lookup for sparcDavid S. Miller2-0/+47
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-12perf tools: Add DWARF register lookup for SHMatt Fleming2-0/+59
Implement get_arch_regstr() for SH so that, given a DWARF register number, the corresponding symbolic name of that register can be looked up. Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Ian Munsie <imunsie@au.ibm.com> LKML-Reference: <e55812819ad18c2ceca5651ac7698a2af46180d7.1278774279.git.matt@console-pimps.org> Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>