diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-08 02:24:07 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-06-08 02:24:07 -0400 |
commit | a292241cccb7e20e8b997a9a44177e7c98141859 (patch) | |
tree | a0b0bb95e7dce3233a2d8b203f9e326cdec7a00e /tools/perf/builtin-top.c | |
parent | d49cb7aeebb974713f9f7ab2991352d3050b095b (diff) | |
parent | 68807a0c2015cb40df4869e16651f0ce5cc14d52 (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 3.16.
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 76cd510d34d0..65aaa5bbf7ec 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -176,7 +176,7 @@ static void perf_top__record_precise_ip(struct perf_top *top, | |||
176 | { | 176 | { |
177 | struct annotation *notes; | 177 | struct annotation *notes; |
178 | struct symbol *sym; | 178 | struct symbol *sym; |
179 | int err; | 179 | int err = 0; |
180 | 180 | ||
181 | if (he == NULL || he->ms.sym == NULL || | 181 | if (he == NULL || he->ms.sym == NULL || |
182 | ((top->sym_filter_entry == NULL || | 182 | ((top->sym_filter_entry == NULL || |
@@ -190,7 +190,9 @@ static void perf_top__record_precise_ip(struct perf_top *top, | |||
190 | return; | 190 | return; |
191 | 191 | ||
192 | ip = he->ms.map->map_ip(he->ms.map, ip); | 192 | ip = he->ms.map->map_ip(he->ms.map, ip); |
193 | err = hist_entry__inc_addr_samples(he, counter, ip); | 193 | |
194 | if (ui__has_annotation()) | ||
195 | err = hist_entry__inc_addr_samples(he, counter, ip); | ||
194 | 196 | ||
195 | pthread_mutex_unlock(¬es->lock); | 197 | pthread_mutex_unlock(¬es->lock); |
196 | 198 | ||
@@ -991,6 +993,16 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset) | |||
991 | return record_parse_callchain_opt(opt, arg, unset); | 993 | return record_parse_callchain_opt(opt, arg, unset); |
992 | } | 994 | } |
993 | 995 | ||
996 | static int perf_top_config(const char *var, const char *value, void *cb) | ||
997 | { | ||
998 | struct perf_top *top = cb; | ||
999 | |||
1000 | if (!strcmp(var, "top.call-graph")) | ||
1001 | return record_parse_callchain(value, &top->record_opts); | ||
1002 | |||
1003 | return perf_default_config(var, value, cb); | ||
1004 | } | ||
1005 | |||
994 | static int | 1006 | static int |
995 | parse_percent_limit(const struct option *opt, const char *arg, | 1007 | parse_percent_limit(const struct option *opt, const char *arg, |
996 | int unset __maybe_unused) | 1008 | int unset __maybe_unused) |
@@ -1115,6 +1127,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1115 | if (top.evlist == NULL) | 1127 | if (top.evlist == NULL) |
1116 | return -ENOMEM; | 1128 | return -ENOMEM; |
1117 | 1129 | ||
1130 | perf_config(perf_top_config, &top); | ||
1131 | |||
1118 | argc = parse_options(argc, argv, options, top_usage, 0); | 1132 | argc = parse_options(argc, argv, options, top_usage, 0); |
1119 | if (argc) | 1133 | if (argc) |
1120 | usage_with_options(top_usage, options); | 1134 | usage_with_options(top_usage, options); |