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] [day] [month] [year] [list]
Date:	Wed, 23 Oct 2013 16:33:05 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	Jiri Olsa <jolsa@...hat.com>,
	"Yan, Zheng" <zheng.z.yan@...el.com>
Subject: Re: [PATCH v2 0/3] perf,x86: add Intel RAPL PMU support

Arnaldo,

On Wed, Oct 23, 2013 at 4:22 PM, Arnaldo Carvalho de Melo
<acme@...hat.com> wrote:
> Em Wed, Oct 23, 2013 at 11:34:42AM +0200, Stephane Eranian escreveu:
>> On Wed, Oct 23, 2013 at 12:18 AM, Arnaldo Carvalho de Melo
>> > What about:
>
>> >  # perf stat -a -e power/energy-cores/,power/energy-pkg/,ref-cycles -I 1000 sleep 1000
>> >  #           time                     events
>> >       1.000264953              2.09 Joules power/energy-cores/
>> >       1.000264953              5.94 Joules power/energy-pkg/
>> >       1.000264953       160,530,320 ref-cycles
>> >       2.000640422              2.07 Joules power/energy-cores/
>> >       2.000640422              5.94 Joules power/energy-pkg/
>> >       2.000640422       152,673,056 ref-cycles
>> >       3.000964416              2.08 Joules power/energy-cores/
>> >       3.000964416              5.93 Joules power/energy-pkg/
>> >       3.000964416       158,779,184 ref-cycles
>
>> > ?
>> > Or even 2.09J power/energy-cores/?
>
>> I can try that.
>
>> > I.e. a perf_evsel__fprintf_value(evsel) would append a unit string, if
>> > available.
>
>> I don't have this function is my tree yet (tip.git).
>
> That would be a new one :-)
>
> At some point I'll study the %pM, etc things in the kernel printk code
> to come up with something like perf_evsel__{f,scn}printf that allows us
> to use just one string format and then pick things like units as a
> modifier, but till then having these fprintf variants seems good enough.
>
Having the printf() would only be good to print the value but the problem is
that you'd need to synchronize with the column headers and width. So
if you say fprintf_value() print the count + unit, then you need to line up
also with the column header which comes from somwhere else. I am
talking about the interval printing mode here.
--
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