diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 13:13:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 13:13:22 -0500 |
commit | 2205afa7d13ec716935dfd4b8ff71059ee7aeb0c (patch) | |
tree | 19e63ed8040e8a82c3cdd331458d246247466a28 /tools/perf/builtin-sched.c | |
parent | 491424c0f46c282a854b88830212bdb0763e93dc (diff) | |
parent | 2cd9046cc53dd2625e2cf5854d6cbb1ba61de914 (diff) |
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf sched: Fix build failure on sparc
perf bench: Add "all" pseudo subsystem and "all" pseudo suite
perf tools: Introduce perf_session class
perf symbols: Ditch dso->find_symbol
perf symbols: Allow lookups by symbol name too
perf symbols: Add missing "Variables" entry to map_type__name
perf symbols: Add support for 'variable' symtabs
perf symbols: Introduce ELF counterparts to symbol_type__is_a
perf symbols: Introduce symbol_type__is_a
perf symbols: Rename kthreads to kmaps, using another abstraction for it
perf tools: Allow building for ARM
hw-breakpoints: Handle bad modify_user_hw_breakpoint off-case return value
perf tools: Allow cross compiling
tracing, slab: Fix no callsite ifndef CONFIG_KMEMTRACE
tracing, slab: Define kmem_cache_alloc_notrace ifdef CONFIG_TRACING
Trivial conflict due to different fixes to modify_user_hw_breakpoint()
in include/linux/hw_breakpoint.h
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 7cca7c15b40a..65021fe1361e 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "util/symbol.h" | 6 | #include "util/symbol.h" |
7 | #include "util/thread.h" | 7 | #include "util/thread.h" |
8 | #include "util/header.h" | 8 | #include "util/header.h" |
9 | #include "util/session.h" | ||
9 | 10 | ||
10 | #include "util/parse-options.h" | 11 | #include "util/parse-options.h" |
11 | #include "util/trace-event.h" | 12 | #include "util/trace-event.h" |
@@ -21,7 +22,6 @@ | |||
21 | 22 | ||
22 | static char const *input_name = "perf.data"; | 23 | static char const *input_name = "perf.data"; |
23 | 24 | ||
24 | static struct perf_header *header; | ||
25 | static u64 sample_type; | 25 | static u64 sample_type; |
26 | 26 | ||
27 | static char default_sort_order[] = "avg, max, switch, runtime"; | 27 | static char default_sort_order[] = "avg, max, switch, runtime"; |
@@ -1663,11 +1663,18 @@ static struct perf_file_handler file_handler = { | |||
1663 | 1663 | ||
1664 | static int read_events(void) | 1664 | static int read_events(void) |
1665 | { | 1665 | { |
1666 | int err; | ||
1667 | struct perf_session *session = perf_session__new(input_name, O_RDONLY, 0); | ||
1668 | |||
1669 | if (session == NULL) | ||
1670 | return -ENOMEM; | ||
1671 | |||
1666 | register_idle_thread(); | 1672 | register_idle_thread(); |
1667 | register_perf_file_handler(&file_handler); | 1673 | register_perf_file_handler(&file_handler); |
1668 | 1674 | ||
1669 | return mmap_dispatch_perf_file(&header, input_name, 0, 0, | 1675 | err = perf_session__process_events(session, 0, &event__cwdlen, &event__cwd); |
1670 | &event__cwdlen, &event__cwd); | 1676 | perf_session__delete(session); |
1677 | return err; | ||
1671 | } | 1678 | } |
1672 | 1679 | ||
1673 | static void print_bad_events(void) | 1680 | static void print_bad_events(void) |