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

From: Jin, Yao
Date: Tue Aug 06 2019 - 07:39:24 EST




On 8/6/2019 4:34 PM, Jiri Olsa wrote:
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


OK, I see. I will save the svals[] in other struct.

Thanks
Jin Yao