diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index c385fecb9d32..78e5d6f3ff61 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -1528,7 +1528,7 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map, | |||
1528 | int more = 0; | 1528 | int more = 0; |
1529 | u64 len; | 1529 | u64 len; |
1530 | int width = 8; | 1530 | int width = 8; |
1531 | int namelen, evsel_name_len, graph_dotted_len; | 1531 | int graph_dotted_len; |
1532 | 1532 | ||
1533 | filename = strdup(dso->long_name); | 1533 | filename = strdup(dso->long_name); |
1534 | if (!filename) | 1534 | if (!filename) |
@@ -1540,17 +1540,14 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map, | |||
1540 | d_filename = basename(filename); | 1540 | d_filename = basename(filename); |
1541 | 1541 | ||
1542 | len = symbol__size(sym); | 1542 | len = symbol__size(sym); |
1543 | namelen = strlen(d_filename); | ||
1544 | evsel_name_len = strlen(evsel_name); | ||
1545 | 1543 | ||
1546 | if (perf_evsel__is_group_event(evsel)) | 1544 | if (perf_evsel__is_group_event(evsel)) |
1547 | width *= evsel->nr_members; | 1545 | width *= evsel->nr_members; |
1548 | 1546 | ||
1549 | printf(" %-*.*s| Source code & Disassembly of %s for %s\n", | 1547 | graph_dotted_len = printf(" %-*.*s| Source code & Disassembly of %s for %s\n", |
1550 | width, width, "Percent", d_filename, evsel_name); | 1548 | width, width, "Percent", d_filename, evsel_name); |
1551 | 1549 | ||
1552 | graph_dotted_len = width + namelen + evsel_name_len; | 1550 | printf("%-*.*s----\n", |
1553 | printf("-%-*.*s-----------------------------------------\n", | ||
1554 | graph_dotted_len, graph_dotted_len, graph_dotted_line); | 1551 | graph_dotted_len, graph_dotted_len, graph_dotted_line); |
1555 | 1552 | ||
1556 | if (verbose) | 1553 | if (verbose) |