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]
Message-ID: <20130325162247.GA14604@infradead.org>
Date:	Mon, 25 Mar 2013 13:22:47 -0300
From:	Arnaldo Carvalho de Melo <acme@...hat.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
	ak@...ux.intel.com, jolsa@...hat.com, namhyung.kim@....com
Subject: Re: [PATCH v2 1/3] perf stat: refactor aggregation code

Em Thu, Feb 14, 2013 at 01:57:27PM +0100, Stephane Eranian escreveu:
> Refactor aggregation code by introducing a single aggr_mode variable
> and an enum for aggregation.

<SNIP>
 
> @@ -542,26 +553,37 @@ static void print_noise(struct perf_evsel *evsel, double avg)
>  	print_noise_pct(stddev_stats(&ps->res_stats[0]), avg);
>  }
>  
> -static void nsec_printout(int cpu, int nr, struct perf_evsel *evsel, double avg)
> +static void aggr_printout(int cpu, int nr)
>  {
> -	double msecs = avg / 1e6;
> -	char cpustr[16] = { '\0', };
> -	const char *fmt = csv_output ? "%s%.6f%s%s" : "%s%18.6f%s%-25s";
> -
> -	if (aggr_socket)
> -		sprintf(cpustr, "S%*d%s%*d%s",
> +	switch (aggr_mode) {
> +	case AGGR_SOCKET:
> +		fprintf(output, "S%*d%s%*d%s",
>  			csv_output ? 0 : -5,
>  			cpu,
>  			csv_sep,
>  			csv_output ? 0 : 4,
>  			nr,
>  			csv_sep);
> -	else if (no_aggr)
> -		sprintf(cpustr, "CPU%*d%s",
> +			break;
> +	case AGGR_NONE:
> +		fprintf(output, "CPU%*d%s",
>  			csv_output ? 0 : -4,
>  			perf_evsel__cpus(evsel)->map[cpu], csv_sep);

I'm fixing this up, how would evsel here work if it is not passed to
aggr_printout()?

I'm also fixing it up wrt the --forever patch and the one Namyung sent
that makes perf stat use perf_evlist__prepare_workload that I had
applied before this one. Will do some tests, put on a separate branch
for you to check that all is still ok and works as expected,

thanks,

- Arnaldo
--
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