diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 12:47:48 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 12:47:48 +0100 |
commit | befddb21c845f8fb49e637997891ef97c6a869dc (patch) | |
tree | 0e7629123184f2dd50291ad6d477b894175f0f26 /tools/perf/builtin-annotate.c | |
parent | e716efde75267eab919cdb2bef5b2cb77f305326 (diff) | |
parent | 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff) |
Merge tag 'v3.8-rc4' into irq/core
Merge Linux 3.8-rc4 before pulling in new commits - we were on an old v3.7 base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 9ea38540b87..dc870cf31b7 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -28,12 +28,12 @@ #include "util/hist.h" #include "util/session.h" #include "util/tool.h" +#include "arch/common.h" #include <linux/bitmap.h> struct perf_annotate { struct perf_tool tool; - char const *input_name; bool force, use_tui, use_stdio; bool full_paths; bool print_line; @@ -139,7 +139,7 @@ find_next: } if (use_browser > 0) { - key = hist_entry__tui_annotate(he, evidx, NULL, NULL, 0); + key = hist_entry__tui_annotate(he, evidx, NULL); switch (key) { case K_RIGHT: next = rb_next(nd); @@ -174,7 +174,7 @@ static int __cmd_annotate(struct perf_annotate *ann) struct perf_evsel *pos; u64 total_nr_samples; - session = perf_session__new(ann->input_name, O_RDONLY, + session = perf_session__new(input_name, O_RDONLY, ann->force, false, &ann->tool); if (session == NULL) return -ENOMEM; @@ -186,6 +186,12 @@ static int __cmd_annotate(struct perf_annotate *ann) goto out_delete; } + if (!objdump_path) { + ret = perf_session_env__lookup_objdump(&session->header.env); + if (ret) + goto out_delete; + } + ret = perf_session__process_events(session, &ann->tool); if (ret) goto out_delete; @@ -246,13 +252,14 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) .sample = process_sample_event, .mmap = perf_event__process_mmap, .comm = perf_event__process_comm, - .fork = perf_event__process_task, + .exit = perf_event__process_exit, + .fork = perf_event__process_fork, .ordered_samples = true, .ordering_requires_timestamps = true, }, }; const struct option options[] = { - OPT_STRING('i', "input", &annotate.input_name, "file", + OPT_STRING('i', "input", &input_name, "file", "input file name"), OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]", "only consider symbols in these dsos"), |