diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index f5a1e4f65263fa..947e20a68738b4 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -363,11 +363,15 @@ int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he, if (!perf_hpp__format[i].cond) continue; + /* + * If there's no field_sep, we still need + * to display initial ' '. + */ if (!sep || !first) { ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " "); advance_hpp(hpp, ret); + } else first = false; - } if (color && perf_hpp__format[i].color) ret = perf_hpp__format[i].color(hpp, he);