aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-04-03 11:54:35 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-03 11:54:35 -0300
commit533c46c31c0e82f19dbb087c77d85eaccd6fefdb (patch)
tree3f98f3e2b8aa51f33b8edef449ec718f93b2deb9 /tools
parente65713ea1e61e92d28284a55df2aa039ebe10003 (diff)
downloadkernel_samsung_tuna-533c46c31c0e82f19dbb087c77d85eaccd6fefdb.zip
kernel_samsung_tuna-533c46c31c0e82f19dbb087c77d85eaccd6fefdb.tar.gz
kernel_samsung_tuna-533c46c31c0e82f19dbb087c77d85eaccd6fefdb.tar.bz2
perf newt: Pass the input_name to perf_session__browse_hists
So that it can use it in the 'perf annotate' command line, otherwise it'll use the default and not the specified -i filename passed to 'perf report'. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-report.c3
-rw-r--r--tools/perf/util/newt.c13
-rw-r--r--tools/perf/util/session.h6
3 files changed, 14 insertions, 8 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 6615e09..e93c69a 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -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))
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c
index 509d921..c93bc2a 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,
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;
@@ -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");
@@ -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];
@@ -527,7 +529,8 @@ do_annotate:
"kallsyms file");
continue;
}
- map_symbol__annotate_browser(browser->selection);
+ map_symbol__annotate_browser(browser->selection,
+ input_name);
}
}
err = 0;
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index dffaff5..27f4c2d 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -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 */