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:	Tue, 8 Jul 2014 21:28:33 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc:	Andi Kleen <andi@...stfloor.org>, jolsa@...hat.com,
	linux-kernel@...r.kernel.org, namhyung@...nel.org,
	acme@...radead.org
Subject: Re: perf: Add support for full Intel event lists v7

Thanks for testing.

On Tue, Jul 08, 2014 at 11:43:11AM -0700, Sukadev Bhattiprolu wrote:
> | The JSON format and perf parser has some minor Intelisms, but they
> | are simple and small and optional. It's easy to extend, so it would be
> | possible to use it for other CPUs too, add different pmu attributes, and
> | add new download sites to the downloader tool.
> 
> Is there a minimal set of JSON entries an architecture would need ?

That should be enough, assuming the EventCode is enough to select
the event.

> 
> I tried the following on Power
> 	[
> 	  {
> 	    "EventCode": "2",
> 	    "EventName": "PM_INST_CMPL",
> 	    "BriefDescription": "Instructions completed",
> 	    "PublicDescription": "Number of PPC instructions finished",
> 	  },
> 	  {
> 	    "EventCode": "0x1E",
> 	    "EventName": "PM_CYC",
> 	    "BriefDescription": "Cycles completed",
> 	    "PublicDescription": "Number of PPC cycles finished",
> 	  }
> 	]
> 
> 	/tmp/perf record --events-file=/tmp/power8.json -e PM_INST_CMPL sleep 1
> 
> works, but for some TBD reason,
> 
> 	/tmp/perf list --events-file=/tmp/power8.json doesn't list PM_INST_CMPL.

Works for me with your input file:

% perf list --events-file t.json
...
  pm_cyc                                             [Cycles completed]
  pm_inst_cmpl                                       [Instructions completed]


> Another observation was that the order of --events-file and -e is significant.
> Maybe worth a note in the man page.

Will add.

> Can you specify the qualifiers like ':k' or ':ku' with the events on
> Intel ?
>to only monitor kernel or user ? Or do they need some additional JSON
> entries ?

They can be all specified.


> With the above events file, I get "invalid event" for 'PM_INST_CMPL:u'

It works in new style syntax, like

perf stat --events-file t.json  -e cpu/pm_inst_cmpl/u  ls


Thanks,
-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