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, 4 Nov 2013 20:45:51 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Rodrigo Campos <rodrigo@...g.com.ar>,
	Arun Sharma <asharma@...com>
Subject: Re: [PATCH 03/14] perf hists: Convert hist entry functions to use
 struct he_stat

Em Thu, Oct 31, 2013 at 03:56:05PM +0900, Namhyung Kim escreveu:

> -static void hist_entry__add_cpumode_period(struct hist_entry *he,
> +static void hist_entry__add_cpumode_period(struct he_stat *he_stat,
>  					   unsigned int cpumode, u64 period)

So it is not anymore a 'struct hist_entry' method, but a 'struct
he_stat' one, thus these functions need to be renamed accordingly, in
the above case it should be:

-static void hist_entry__add_cpumode_period(struct hist_entry *he,
+static void he_stat__add_cpumode_period(struct he_stat *he_stat,
+				 	 unsigned int cpumode, u64 period)

>  {
>  	switch (cpumode) {
>  	case PERF_RECORD_MISC_KERNEL:
> -		he->stat.period_sys += period;
> +		he_stat->period_sys += period;
>  		break;
>  	case PERF_RECORD_MISC_USER:
> -		he->stat.period_us += period;
> +		he_stat->period_us += period;
>  		break;
>  	case PERF_RECORD_MISC_GUEST_KERNEL:
> -		he->stat.period_guest_sys += period;
> +		he_stat->period_guest_sys += period;
>  		break;
>  	case PERF_RECORD_MISC_GUEST_USER:
> -		he->stat.period_guest_us += period;
> +		he_stat->period_guest_us += period;
>  		break;
>  	default:
>  		break;
> @@ -223,10 +223,10 @@ static void he_stat__add_stat(struct he_stat *dest, struct he_stat *src)
>  	dest->weight		+= src->weight;
>  }
>  
> -static void hist_entry__decay(struct hist_entry *he)
> +static void hist_entry__decay(struct he_stat *he_stat)

Ditto

>  {
> -	he->stat.period = (he->stat.period * 7) / 8;
> -	he->stat.nr_events = (he->stat.nr_events * 7) / 8;
> +	he_stat->period = (he_stat->period * 7) / 8;
--
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