[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140416184606.GI22728@two.firstfloor.org>
Date: Wed, 16 Apr 2014 20:46:06 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Namhyung Kim <namhyung@...il.com>
Cc: Andi Kleen <andi@...stfloor.org>, jolsa@...hat.com,
acme@...radead.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] perf, tools: Support spark lines in perf stat v2
> > +void print_stat_spark(FILE *f, struct stats *stat)
> > +{
> > + int n = stat->n, len;
> > +
> > + if (n <= 1)
> > + return;
> > + len = n;
>
> It seems the 'n' is not needed at all - just use 'len'.
This would break ".." for n == NUM_SPARK_VALS
>
>
> > + if (len > NUM_SPARK_VALS)
> > + len = NUM_SPARK_VALS;
> > + if (all_the_same(stat->svals, len))
> > + return;
>
> Why does it skip printing if all values are same? I think you wanted to
> skip the "all zero" (uncounted) case, right?
A spark line is meaningless if all values are the same.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists