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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Aug 2019 10:35:43 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v3] perf diff: Report noisy for cycles diff

On Sat, Aug 10, 2019 at 07:30:29AM +0800, Jin Yao wrote:

SNIP

>  static int process_block_per_sym(struct hist_entry *he)
> @@ -684,6 +694,21 @@ static struct hist_entry *get_block_pair(struct hist_entry *he,
>  	return NULL;
>  }
>  
> +static void init_spark_values(unsigned long *svals, int num)
> +{
> +	for (int i = 0; i < num; i++)
> +		svals[i] = 0;
> +}
> +
> +static void update_spark_value(unsigned long *svals, int num,
> +			       struct stats *stats, u64 val)
> +{
> +	int n = stats->n;
> +
> +	if (n < num)
> +		svals[n] = val;
> +}
> +
>  static void compute_cycles_diff(struct hist_entry *he,
>  				struct hist_entry *pair)
>  {
> @@ -692,6 +717,23 @@ static void compute_cycles_diff(struct hist_entry *he,
>  		pair->diff.cycles =
>  			pair->block_info->cycles_aggr / pair->block_info->num_aggr -
>  			he->block_info->cycles_aggr / he->block_info->num_aggr;
> +

should below code be executed only for show_noisy?

jirka

> +		init_stats(&pair->diff.stats);
> +		init_spark_values(pair->diff.svals, NUM_SPARKS);
> +
> +		for (int i = 0; i < pair->block_info->num; i++) {
> +			u64 val;
> +
> +			if (i >= he->block_info->num || i >= NUM_SPARKS)
> +				break;
> +
> +			val = labs(pair->block_info->cycles_spark[i] -
> +				     he->block_info->cycles_spark[i]);
> +
> +			update_spark_value(pair->diff.svals, NUM_SPARKS,
> +					   &pair->diff.stats, val);
> +			update_stats(&pair->diff.stats, val);
> +		}
>  	}
>  }

SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ