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: <CABPqkBTCJF9eF_3Nj9nV=PNqVnrcZhkZ90oJfQ6tpHzFDFgptg@mail.gmail.com>
Date:	Wed, 20 Feb 2013 22:01:20 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Jiri Olsa <jolsa@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH] perf x86: Change SandyBridge and IvyBrige instructions
 event to be precise

On Wed, Feb 20, 2013 at 9:55 PM, Andi Kleen <andi@...stfloor.org> wrote:
> Jiri Olsa <jolsa@...hat.com> writes:
>
>> Changing the default 'instructions' HW event for SandyBridge and
>> IvyBrige to use the available precise 'instructions' event.
>>
>> The precise event is defined in Intel SDM as:
>>
>> INST_RETIRED.ALL - Precise instruction retired event with HW to
>> reduce effect of PEBS shadow in IP distribution
>>
>> for both SandyBridge and IvyBrige micro-archs. It allows to use
>> precise modifier on 'instructions' event on SandyBridge and
>> IvyBrige micro-archs which is not possible now.
>
There is also the problem that on SNB, PREC_DIST must be
taken ALONE to be correct. By that, I mean no other counter
must be active. So I don't think it is a good idea.

Also PREC_DIST is marked as constrained to counter 2 only.
That in effect, as Andi pointed out, will make the fixed counter
for instruction_retired, unused because you've set a umask now.

I don't think it buys you much. People read too much into what
PEBS gives you. I can show you examples where PEBS
is worse than no PEBS.

> Actually it's possible, you just have to use it explicitely.
>
> This will break a lot of profiling setups that assume instructions
> count on the fixed counter and use the 4/8 other counters.
> Also it will give very bad results with perf stat, which
> you don't want to run with pebs.
>
> Even worse with your change the fixed instruction counter is not
> accessible anymore. So pretty much all the standard setups
> that collect it in addition to other events and fill all
> the counters would break.
>
> I don't think it should be done by default, but yes explicitely
> it's quite useful.
>
> My Haswell patchkit (in the "extended version") exposes
> the precise event as "instructions-p" through sysfs.
>
> -Andi
>
> --
> ak@...ux.intel.com -- Speaking for myself only
--
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