Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191176
b: refs/heads/master
c: 533c46c
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Apr 3, 2010
1 parent 9f3a67e commit fb1fb95
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e65713ea1e61e92d28284a55df2aa039ebe10003
refs/heads/master: 533c46c31c0e82f19dbb087c77d85eaccd6fefdb
3 changes: 2 additions & 1 deletion trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ static int __cmd_report(void)
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))
Expand Down
13 changes: 8 additions & 5 deletions trunk/tools/perf/util/newt.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ static size_t hist_entry__append_browser(struct hist_entry *self,
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;
Expand All @@ -331,8 +332,8 @@ static void map_symbol__annotate_browser(const struct map_symbol *self)
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");
Expand Down Expand Up @@ -472,7 +473,8 @@ static int hist_browser__populate(struct hist_browser *self, struct rb_root *his
}

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];
Expand Down Expand Up @@ -527,7 +529,8 @@ int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,
"kallsyms file");
continue;
}
map_symbol__annotate_browser(browser->selection);
map_symbol__annotate_browser(browser->selection,
input_name);
}
}
err = 0;
Expand Down
6 changes: 4 additions & 2 deletions trunk/tools/perf/util/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ static inline struct map *
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 */

0 comments on commit fb1fb95

Please sign in to comment.