From owner-freebsd-current@FreeBSD.ORG Tue Sep 4 19:23:24 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F420106564A for ; Tue, 4 Sep 2012 19:23:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 512078FC20; Tue, 4 Sep 2012 19:23:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q84JNONT056013; Tue, 4 Sep 2012 19:23:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q84JNOwP055964; Tue, 4 Sep 2012 19:23:24 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Tue, 4 Sep 2012 21:23:21 +0200 From: Baptiste Daroussin To: Fabien Thomas Message-ID: <20120904192320.GF88081@ithaqua.etoilebsd.net> References: <0D822C75-7240-42E3-8780-18CABC9C45A1@netasq.com> <20120903212340.GE88081@ithaqua.etoilebsd.net> <60A32BCE-756A-4A0D-A24D-7AC42F71BD1A@netasq.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iBwuxWUsK/REspAd" Content-Disposition: inline In-Reply-To: <60A32BCE-756A-4A0D-A24D-7AC42F71BD1A@netasq.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current Subject: Re: [CFT] hwpmc support for Intel Ivy Bridge X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 19:23:24 -0000 --iBwuxWUsK/REspAd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 04, 2012 at 09:35:07AM +0200, Fabien Thomas wrote: >=20 > Le 3 sept. 2012 =E0 23:23, Baptiste Daroussin a =E9crit : >=20 > > On Mon, Sep 03, 2012 at 02:04:21PM +0200, Fabien Thomas wrote: > >> Hi, > >>=20 > >> Find a patch that add Intel Ivy Bridge support to hwpmc(9). > >> The patch also support offcore RSP token for Sandy Bridge. > >> Note: No uncore support. > >>=20 > >> Tested on: > >> Intel(R) Xeon(R) CPU E3-1265L V2 @ 2.50GHz (2494.35-MHz K8-class CPU) > >> Origin =3D "GenuineIntel" Id =3D 0x306a9 Family =3D 6 Model =3D 3a = Stepping =3D 9 > >>=20 > >> http://people.freebsd.org/~fabient/patch-hwpmc_ivy_bridge_head > >>=20 > >> cd /usr/src && patch -p0 < patch-hwpmc_ivy_bridge_head=20 > >> and rebuild world. > >>=20 > >>=20 > >> Fabien > >=20 > > World building, I'll keep you in touch > >=20 > > Is there any particulat testing, I can do other than using the new worl= d? >=20 > Thanks for testing! >=20 > Yes you can test it quickly using top mode for example: >=20 > kldload hwpmc > pmccontrol -L to list all events >=20 > some test: >=20 > - offcore > pmcstat -SOFF_CORE_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY -w1 -T >=20 > - unhalted cycle (programmable counter) > pmcstat -n2000000 -SCPU_CLK_UNHALTED.THREAD_P -w4 -T >=20 > - INSTR_RETIRED_ANY (fixed counter) > pmcstat -n2000000 -S INSTR_RETIRED_ANY -w4 -T >=20 > - Soft counter: > pmcstat -SPAGE_FAULT.ALL -w4 -T >=20 > all at the same time (and change view by pressing 'p': > pmcstat -SOFF_CORE_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY -n2000000 -S= CPU_CLK_UNHALTED.THREAD_P -n2000000 -S INSTR_RETIRED_ANY -SPAGE_FAULT.ALL= -w1 -T >=20 >=20 > all events are described in the man page pmc.ivybridge >=20 >=20 > >=20 > > regards, > > Bapt >=20 Hi, here are the results # pmccontrol -L SOFT CLOCK.STAT CLOCK.HARD LOCK.FAILED PAGE_FAULT.WRITE PAGE_FAULT.READ PAGE_FAULT.ALL # pmcstat -SOFF_CORE_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY -w1 -T pmcstat: ERROR: Cannot allocate system-mode pmc with specification "OFF_COR= E_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY": Invalid argument # pmcstat -n2000000 -S INSTR_RETIRED_ANY -w4 -T pmcstat: ERROR: Cannot allocate system-mode pmc with specification "INSTR_R= ETIRED_ANY": Invalid argument # pmcstat -n2000000 -S INSTR_RETIRED_ANY -w4 -T pmcstat: ERROR: Cannot allocate system-mode pmc with specification "INSTR_R= ETIRED_ANY": Invalid argument # pmcstat -SPAGE_FAULT.ALL -w4 -T (This one seems to work correctly # pmcstat -SOFF_CORE_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY -n2000000 -S= CPU_CLK_UNHALTED.THREAD_P -n2000000 -S INSTR_RETIRED_ANY -SPAGE_FAULT pmcstat: ERROR: Cannot allocate system-mode pmc with specification "OFF_COR= E_RESPONSE_0,rsp=3DREQ_DMND_DATA_RD+RES_ANY": Invalid argument The pmctest.py fails:=20 # ./test/hwpmc/pmctest.py Traceback (most recent call last): File "./test/hwpmc/pmctest.py", line 94, in main() File "./test/hwpmc/pmctest.py", line 81, in main stdout=3DPIPE) File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/local/lib/python2.7/subprocess.py", line 1249, in _execute_chi= ld raise child_exception TypeError: execv() arg 2 must contain only strings regards, Bapt --iBwuxWUsK/REspAd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBGVSgACgkQ8kTtMUmk6EzehgCfd3fpYjeqp+VPJIAud9wJfY6G xDoAn2XuY0uCVHEYo+myoJ3E9p52Zk53 =QOo+ -----END PGP SIGNATURE----- --iBwuxWUsK/REspAd--