stats->stats.total);
if (use_browser)
perf_session__browse_hists(&stats->hists, nr_hists,
- stats->stats.total, help);
+ stats->stats.total, help,
+ input_name);
else {
if (rb_first(&session->stats_by_id) ==
rb_last(&session->stats_by_id))
return ret;
}
-static void map_symbol__annotate_browser(const struct map_symbol *self)
+static void map_symbol__annotate_browser(const struct map_symbol *self,
+ const char *input_name)
{
FILE *fp;
int cols, rows;
if (self->sym == NULL)
return;
- if (asprintf(&str, "perf annotate -d \"%s\" %s 2>&1 | expand",
- self->map->dso->name, self->sym->name) < 0)
+ if (asprintf(&str, "perf annotate -i \"%s\" -d \"%s\" %s 2>&1 | expand",
+ input_name, self->map->dso->name, self->sym->name) < 0)
return;
fp = popen(str, "r");
}
int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,
- u64 session_total, const char *helpline)
+ u64 session_total, const char *helpline,
+ const char *input_name)
{
struct newtExitStruct es;
char str[1024];
"kallsyms file");
continue;
}
- map_symbol__annotate_browser(browser->selection);
+ map_symbol__annotate_browser(browser->selection,
+ input_name);
}
}
err = 0;
static inline int perf_session__browse_hists(struct rb_root *hists __used,
u64 nr_hists __used,
u64 session_total __used,
- const char *helpline __used)
+ const char *helpline __used,
+ const char *input_name __used)
{
return 0;
}
#else
int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,
- u64 session_total, const char *helpline);
+ u64 session_total, const char *helpline,
+ const char *input_name);
#endif
#endif /* __PERF_SESSION_H */