Re: [PATCH 14/14] perf diff: Display empty space for non paired samples
From: Namhyung Kim
Date: Thu Oct 04 2012 - 02:16:48 EST
On Thu, 27 Sep 2012 13:09:35 +0200, Jiri Olsa wrote:
> Currently in 'Baseline' and 'Period Base' columns zero values are
> displayed in case no pair is found for the sample. This might be
> confusing, using empty space instead.
[snip]
> @@ -246,8 +249,12 @@ static int hpp__entry_period_baseline(struct perf_hpp *hpp, struct hist_entry *h
> u64 period = pair ? pair->period : 0;
> const char *fmt = symbol_conf.field_sep ? "%" PRIu64 : "%12" PRIu64;
>
> - return scnprintf(hpp->buf, hpp->size, fmt, period);
> + if (pair)
> + return scnprintf(hpp->buf, hpp->size, fmt, period);
> + else
> + return scnprintf(hpp->buf, hpp->size, " ");
It seems that it's not needed when -t (field separator) switch is given.
Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/