summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index adbf28183560..ed4583128b9c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1758,6 +1758,7 @@ static int trace__printf_interrupted_entry(struct trace *trace)
1758{ 1758{
1759 struct thread_trace *ttrace; 1759 struct thread_trace *ttrace;
1760 size_t printed; 1760 size_t printed;
1761 int len;
1761 1762
1762 if (trace->failure_only || trace->current == NULL) 1763 if (trace->failure_only || trace->current == NULL)
1763 return 0; 1764 return 0;
@@ -1768,9 +1769,14 @@ static int trace__printf_interrupted_entry(struct trace *trace)
1768 return 0; 1769 return 0;
1769 1770
1770 printed = trace__fprintf_entry_head(trace, trace->current, 0, false, ttrace->entry_time, trace->output); 1771 printed = trace__fprintf_entry_head(trace, trace->current, 0, false, ttrace->entry_time, trace->output);
1771 printed += fprintf(trace->output, ")%-*s ...\n", trace->args_alignment, ttrace->entry_str); 1772 printed += len = fprintf(trace->output, "%s)", ttrace->entry_str);
1772 ttrace->entry_pending = false; 1773
1774 if (len < trace->args_alignment - 4)
1775 printed += fprintf(trace->output, "%-*s", trace->args_alignment - 4 - len, " ");
1773 1776
1777 printed += fprintf(trace->output, " ...\n");
1778
1779 ttrace->entry_pending = false;
1774 ++trace->nr_events_printed; 1780 ++trace->nr_events_printed;
1775 1781
1776 return printed; 1782 return printed;
@@ -2026,9 +2032,10 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
2026 if (ttrace->entry_pending) { 2032 if (ttrace->entry_pending) {
2027 printed = fprintf(trace->output, "%s", ttrace->entry_str); 2033 printed = fprintf(trace->output, "%s", ttrace->entry_str);
2028 } else { 2034 } else {
2029 fprintf(trace->output, " ... ["); 2035 printed += fprintf(trace->output, " ... [");
2030 color_fprintf(trace->output, PERF_COLOR_YELLOW, "continued"); 2036 color_fprintf(trace->output, PERF_COLOR_YELLOW, "continued");
2031 fprintf(trace->output, "]: %s()", sc->name); 2037 printed += 9;
2038 printed += fprintf(trace->output, "]: %s()", sc->name);
2032 } 2039 }
2033 2040
2034 printed++; /* the closing ')' */ 2041 printed++; /* the closing ')' */