aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/top.c')
-rw-r--r--tools/perf/util/top.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c
index 1d2e2652cd68..70a9c13f4ad5 100644
--- a/tools/perf/util/top.c
+++ b/tools/perf/util/top.c
@@ -200,6 +200,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root,
200 200
201 for (nd = rb_first(root); nd; nd = rb_next(nd)) { 201 for (nd = rb_first(root); nd; nd = rb_next(nd)) {
202 struct sym_entry *syme = rb_entry(nd, struct sym_entry, rb_node); 202 struct sym_entry *syme = rb_entry(nd, struct sym_entry, rb_node);
203 struct symbol *sym = sym_entry__symbol(syme);
203 204
204 if (++printed > top->print_entries || 205 if (++printed > top->print_entries ||
205 (int)syme->snap_count < top->count_filter) 206 (int)syme->snap_count < top->count_filter)
@@ -211,7 +212,7 @@ void perf_top__find_widths(struct perf_top *top, struct rb_root *root,
211 if (syme->map->dso->short_name_len > *dso_short_width) 212 if (syme->map->dso->short_name_len > *dso_short_width)
212 *dso_short_width = syme->map->dso->short_name_len; 213 *dso_short_width = syme->map->dso->short_name_len;
213 214
214 if (syme->name_len > *sym_width) 215 if (sym->namelen > *sym_width)
215 *sym_width = syme->name_len; 216 *sym_width = sym->namelen;
216 } 217 }
217} 218}