- hpp->buf = buf;
- hpp->size = size;
-
- /*
- * No need to call hist_entry__snprintf_alignment() since this
- * fmt is always the last column in the hierarchy mode.
- */
- fmt = he->fmt;
- if (perf_hpp__use_color() && fmt->color)
- fmt->color(fmt, hpp, he);
- else
- fmt->entry(fmt, hpp, he);
-
- /*
- * dynamic entries are right-aligned but we want left-aligned
- * in the hierarchy mode
- */
- printed += fprintf(fp, "%s\n", ltrim(buf));
+ perf_hpp_list__for_each_format(he->hpp_list, fmt) {
+ hpp->buf = buf;
+ hpp->size = size;
+
+ /*
+ * No need to call hist_entry__snprintf_alignment() since this
+ * fmt is always the last column in the hierarchy mode.
+ */
+ if (perf_hpp__use_color() && fmt->color)
+ fmt->color(fmt, hpp, he);
+ else
+ fmt->entry(fmt, hpp, he);
+
+ /*
+ * dynamic entries are right-aligned but we want left-aligned
+ * in the hierarchy mode
+ */
+ printed += fprintf(fp, "%s%s", sep ?: " ", ltrim(buf));
+ }
+ printed += putc('\n', fp);