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:	Sat, 14 Apr 2012 12:24:58 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Robert Richter <robert.richter@....com>
Cc:	Ingo Molnar <mingo@...e.hu>, Stephane Eranian <eranian@...gle.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/12] perf/x86-ibs: Precise event sampling with IBS for
 AMD CPUs

On Mon, 2012-04-02 at 20:19 +0200, Robert Richter wrote:
> +       switch (event->attr.type) {
> +       case PERF_TYPE_HARDWARE:
> +               switch (event->attr.config) {
> +               case PERF_COUNT_HW_CPU_CYCLES:
> +                       *config = 0;
> +                       return 0;
> +               }
> +               break;
> +       case PERF_TYPE_RAW:
> +               switch (event->attr.config) {
> +               case 0x0076:
> +                       *config = 0;
> +                       return 0;
> +               case 0x00C1:
> +                       *config = IBS_OP_CNT_CTL;
> +                       return 0;
> +               }
> +               break;
> +       default:
> +               return -ENOENT;
> +       } 

Another option would be to do this from amd_pmu_hw_config() after you've
already gotten rid of the whole attr.type thing.
--
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