Re: [PATCH v2] perf diff: Report noisy for cycles diff

From: Jiri Olsa
Date: Tue Aug 06 2019 - 04:34:17 EST


On Thu, Jul 25, 2019 at 06:14:32AM +0800, Jin Yao wrote:

SNIP

> +}
> +
> double avg_stats(struct stats *stats)
> {
> return stats->mean;
> diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
> index 95b4de7a9d51..3448d319a220 100644
> --- a/tools/perf/util/stat.h
> +++ b/tools/perf/util/stat.h
> @@ -8,14 +8,18 @@
> #include <sys/time.h>
> #include <sys/resource.h>
> #include <sys/wait.h>
> +#include <stdio.h>
> #include "xyarray.h"
> #include "rblist.h"
> #include "perf.h"
> #include "event.h"
>
> +#define NUM_SPARK_VALS 8 /* support spark line on first N items */
> +
> struct stats {
> double n, mean, M2;
> u64 max, min;
> + unsigned long svals[NUM_SPARK_VALS];
> };

please do it without changing the 'struct stats', it's all
over the place and diff would be the only user

thanks
jirka