aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2013-02-25 15:50:05 -0500
committerMichal Marek <mmarek@suse.cz>2013-02-25 15:51:57 -0500
commite3900e74f26fc924c8e9e2a922bd40369b0bb517 (patch)
tree6e868575d346032ba9408f350c6e5369e0e52b0d /tools/perf/builtin-annotate.c
parent62dc989921df2a98d1a73aacd085abe941cb9828 (diff)
parent02f3e53a131c8aa3fe3c954058f1add5beeae621 (diff)
Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
There is one kconfig fix in the rc-fixes branch that I forgot to submit for 3.8, so let's add it to the kconfig branch for 3.9-rc1.
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 9ea38540b873..dc870cf31b79 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -28,12 +28,12 @@
28#include "util/hist.h" 28#include "util/hist.h"
29#include "util/session.h" 29#include "util/session.h"
30#include "util/tool.h" 30#include "util/tool.h"
31#include "arch/common.h"
31 32
32#include <linux/bitmap.h> 33#include <linux/bitmap.h>
33 34
34struct perf_annotate { 35struct perf_annotate {
35 struct perf_tool tool; 36 struct perf_tool tool;
36 char const *input_name;
37 bool force, use_tui, use_stdio; 37 bool force, use_tui, use_stdio;
38 bool full_paths; 38 bool full_paths;
39 bool print_line; 39 bool print_line;
@@ -139,7 +139,7 @@ find_next:
139 } 139 }
140 140
141 if (use_browser > 0) { 141 if (use_browser > 0) {
142 key = hist_entry__tui_annotate(he, evidx, NULL, NULL, 0); 142 key = hist_entry__tui_annotate(he, evidx, NULL);
143 switch (key) { 143 switch (key) {
144 case K_RIGHT: 144 case K_RIGHT:
145 next = rb_next(nd); 145 next = rb_next(nd);
@@ -174,7 +174,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
174 struct perf_evsel *pos; 174 struct perf_evsel *pos;
175 u64 total_nr_samples; 175 u64 total_nr_samples;
176 176
177 session = perf_session__new(ann->input_name, O_RDONLY, 177 session = perf_session__new(input_name, O_RDONLY,
178 ann->force, false, &ann->tool); 178 ann->force, false, &ann->tool);
179 if (session == NULL) 179 if (session == NULL)
180 return -ENOMEM; 180 return -ENOMEM;
@@ -186,6 +186,12 @@ static int __cmd_annotate(struct perf_annotate *ann)
186 goto out_delete; 186 goto out_delete;
187 } 187 }
188 188
189 if (!objdump_path) {
190 ret = perf_session_env__lookup_objdump(&session->header.env);
191 if (ret)
192 goto out_delete;
193 }
194
189 ret = perf_session__process_events(session, &ann->tool); 195 ret = perf_session__process_events(session, &ann->tool);
190 if (ret) 196 if (ret)
191 goto out_delete; 197 goto out_delete;
@@ -246,13 +252,14 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
246 .sample = process_sample_event, 252 .sample = process_sample_event,
247 .mmap = perf_event__process_mmap, 253 .mmap = perf_event__process_mmap,
248 .comm = perf_event__process_comm, 254 .comm = perf_event__process_comm,
249 .fork = perf_event__process_task, 255 .exit = perf_event__process_exit,
256 .fork = perf_event__process_fork,
250 .ordered_samples = true, 257 .ordered_samples = true,
251 .ordering_requires_timestamps = true, 258 .ordering_requires_timestamps = true,
252 }, 259 },
253 }; 260 };
254 const struct option options[] = { 261 const struct option options[] = {
255 OPT_STRING('i', "input", &annotate.input_name, "file", 262 OPT_STRING('i', "input", &input_name, "file",
256 "input file name"), 263 "input file name"),
257 OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]", 264 OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
258 "only consider symbols in these dsos"), 265 "only consider symbols in these dsos"),