aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/ui/hist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index aa84130024d5..6416580b3350 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -463,11 +463,15 @@ int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he,
463 if (!perf_hpp__format[i].cond) 463 if (!perf_hpp__format[i].cond)
464 continue; 464 continue;
465 465
466 /*
467 * If there's no field_sep, we still need
468 * to display initial ' '.
469 */
466 if (!sep || !first) { 470 if (!sep || !first) {
467 ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " "); 471 ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " ");
468 advance_hpp(hpp, ret); 472 advance_hpp(hpp, ret);
473 } else
469 first = false; 474 first = false;
470 }
471 475
472 if (color && perf_hpp__format[i].color) 476 if (color && perf_hpp__format[i].color)
473 ret = perf_hpp__format[i].color(hpp, he); 477 ret = perf_hpp__format[i].color(hpp, he);