lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ