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>] [day] [month] [year] [list]
Date:	Wed, 14 Jan 2015 16:50:44 -0600
From:	Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
To:	<a.p.zijlstra@...llo.nl>, <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>, <acme@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: question regarding -D flag in perf stat

Hi all,

I had a question regarding the intention of the -D flag after looking at 
perf stat numbers of the following workload:

main(){

int a=5, b=6;

int i;

#pragma omp for schedule(dynamic)

for (i=0; i<10000000; i++){

b=b+a;

}

return 0;

}

_Stats without delay:_

# perf stat -e cycles,instructions,cpu-clock,task-clock ../../test/a.out

Performance counter stats for '../../test/a.out':

    203,581,363,567 cycles #    1.500 GHz

      7,563,983,198 instructions #    0.04  insns per cycle

      135721.617844 cpu-clock (msec)

      135721.600586 task-clock (msec) # *5.985 CPUs utilized*

       22.678577620 seconds time elapsed (run time)

_Stats with delay of 10 seconds:_

# perf stat -D 10000 -e cycles,instructions,cpu-clock,task-clock 
../../test/a.out

b=363264281

Performance counter stats for '../../test/a.out':

    112,134,813,161 cycles #    1.500 GHz

      4,461,136,761 instructions #    0.04  insns per cycle

       74757.386789 cpu-clock (msec)

       74757.317781 task-clock (msec) # *3.324 CPUs utilized*

22.490237094 seconds time elapsed**(run time)*(delay time is not 
excluded here)*

The issue is that CPU utilization is calculated as 
task-clock/total-runtime which in the case of no delay is fine.
But for the delay case, the total run time should exclude the delay 
time. Right?
(and as a consequence, utilization would be calculated exclusive of the 
delay time which would give us CPU utilization only for the period 
during which perf actually collects info)

Or is this the way -D flag is intended to work?

Thanks for the clarifications,
-Aravind.
--
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