diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-05-28 13:55:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-28 17:25:44 -0400 |
commit | a827c875f2ebe69c6e6db5e7f112d4beb4d80f01 (patch) | |
tree | 68ffab0b70688679a239c1e6312ff565784fb0c9 /Documentation/perf_counter/builtin-report.c | |
parent | 0085c954140d27937ada29d139c16341075d45e4 (diff) |
perf_counter tools: Consolidate dso methods to load kernel symbols
Now one has just to use dso__load_kernel() optionally passing a vmlinux
filename.
Will make things easier for perf top that will want to pass a callback
to filter some symbols.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/builtin-report.c')
-rw-r--r-- | Documentation/perf_counter/builtin-report.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 889067eb2b69..4e9f2bc10452 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c | |||
@@ -118,18 +118,13 @@ static void dsos__fprintf(FILE *fp) | |||
118 | 118 | ||
119 | static int load_kernel(void) | 119 | static int load_kernel(void) |
120 | { | 120 | { |
121 | int err = -1; | 121 | int err; |
122 | 122 | ||
123 | kernel_dso = dso__new("[kernel]", 0); | 123 | kernel_dso = dso__new("[kernel]", 0); |
124 | if (!kernel_dso) | 124 | if (!kernel_dso) |
125 | return -1; | 125 | return -1; |
126 | 126 | ||
127 | if (vmlinux) | 127 | err = dso__load_kernel(kernel_dso, vmlinux); |
128 | err = dso__load_vmlinux(kernel_dso, vmlinux); | ||
129 | |||
130 | if (err) | ||
131 | err = dso__load_kallsyms(kernel_dso); | ||
132 | |||
133 | if (err) { | 128 | if (err) { |
134 | dso__delete(kernel_dso); | 129 | dso__delete(kernel_dso); |
135 | kernel_dso = NULL; | 130 | kernel_dso = NULL; |