From: Andi Kleen <andi@firstfloor.org>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
jolsa@redhat.com, acme@infradead.org,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] perf, tools: Support spark lines in perf stat v2
Date: Wed, 16 Apr 2014 20:46:06 +0200 [thread overview]
Message-ID: <20140416184606.GI22728@two.firstfloor.org> (raw)
In-Reply-To: <87wqerrtfs.fsf@sejong.aot.lge.com>
> > +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
next prev parent reply other threads:[~2014-04-16 18:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 16:09 [PATCH] perf, tools: Support spark lines in perf stat v2 Andi Kleen
2014-04-15 6:35 ` Namhyung Kim
2014-04-16 18:46 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-05-12 23:01 Andi Kleen
2014-05-13 9:27 ` Peter Zijlstra
2014-05-13 14:08 ` Andi Kleen
2014-05-26 17:33 ` Jiri Olsa
2014-05-28 0:18 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140416184606.GI22728@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.