diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-report.c | 3 | ||||
-rw-r--r-- | tools/perf/util/newt.c | 13 | ||||
-rw-r--r-- | tools/perf/util/session.h | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 6615e09e336f..e93c69a8e720 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -313,7 +313,8 @@ static int __cmd_report(void) | |||
313 | stats->stats.total); | 313 | stats->stats.total); |
314 | if (use_browser) | 314 | if (use_browser) |
315 | perf_session__browse_hists(&stats->hists, nr_hists, | 315 | perf_session__browse_hists(&stats->hists, nr_hists, |
316 | stats->stats.total, help); | 316 | stats->stats.total, help, |
317 | input_name); | ||
317 | else { | 318 | else { |
318 | if (rb_first(&session->stats_by_id) == | 319 | if (rb_first(&session->stats_by_id) == |
319 | rb_last(&session->stats_by_id)) | 320 | rb_last(&session->stats_by_id)) |
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 509d921532ef..c93bc2a2d137 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -317,7 +317,8 @@ static size_t hist_entry__append_browser(struct hist_entry *self, | |||
317 | return ret; | 317 | return ret; |
318 | } | 318 | } |
319 | 319 | ||
320 | static void map_symbol__annotate_browser(const struct map_symbol *self) | 320 | static void map_symbol__annotate_browser(const struct map_symbol *self, |
321 | const char *input_name) | ||
321 | { | 322 | { |
322 | FILE *fp; | 323 | FILE *fp; |
323 | int cols, rows; | 324 | int cols, rows; |
@@ -331,8 +332,8 @@ static void map_symbol__annotate_browser(const struct map_symbol *self) | |||
331 | if (self->sym == NULL) | 332 | if (self->sym == NULL) |
332 | return; | 333 | return; |
333 | 334 | ||
334 | if (asprintf(&str, "perf annotate -d \"%s\" %s 2>&1 | expand", | 335 | if (asprintf(&str, "perf annotate -i \"%s\" -d \"%s\" %s 2>&1 | expand", |
335 | self->map->dso->name, self->sym->name) < 0) | 336 | input_name, self->map->dso->name, self->sym->name) < 0) |
336 | return; | 337 | return; |
337 | 338 | ||
338 | fp = popen(str, "r"); | 339 | fp = popen(str, "r"); |
@@ -472,7 +473,8 @@ static int hist_browser__populate(struct hist_browser *self, struct rb_root *his | |||
472 | } | 473 | } |
473 | 474 | ||
474 | int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists, | 475 | int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists, |
475 | u64 session_total, const char *helpline) | 476 | u64 session_total, const char *helpline, |
477 | const char *input_name) | ||
476 | { | 478 | { |
477 | struct newtExitStruct es; | 479 | struct newtExitStruct es; |
478 | char str[1024]; | 480 | char str[1024]; |
@@ -527,7 +529,8 @@ do_annotate: | |||
527 | "kallsyms file"); | 529 | "kallsyms file"); |
528 | continue; | 530 | continue; |
529 | } | 531 | } |
530 | map_symbol__annotate_browser(browser->selection); | 532 | map_symbol__annotate_browser(browser->selection, |
533 | input_name); | ||
531 | } | 534 | } |
532 | } | 535 | } |
533 | err = 0; | 536 | err = 0; |
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index dffaff52ba44..27f4c2dc715b 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -96,12 +96,14 @@ static inline struct map * | |||
96 | static inline int perf_session__browse_hists(struct rb_root *hists __used, | 96 | static inline int perf_session__browse_hists(struct rb_root *hists __used, |
97 | u64 nr_hists __used, | 97 | u64 nr_hists __used, |
98 | u64 session_total __used, | 98 | u64 session_total __used, |
99 | const char *helpline __used) | 99 | const char *helpline __used, |
100 | const char *input_name __used) | ||
100 | { | 101 | { |
101 | return 0; | 102 | return 0; |
102 | } | 103 | } |
103 | #else | 104 | #else |
104 | int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists, | 105 | int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists, |
105 | u64 session_total, const char *helpline); | 106 | u64 session_total, const char *helpline, |
107 | const char *input_name); | ||
106 | #endif | 108 | #endif |
107 | #endif /* __PERF_SESSION_H */ | 109 | #endif /* __PERF_SESSION_H */ |