Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2012 21:23:21 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Fabien Thomas <fabien.thomas@netasq.com>
Cc:        freebsd-current <freebsd-current@FreeBSD.org>
Subject:   Re: [CFT] hwpmc support for Intel Ivy Bridge
Message-ID:  <20120904192320.GF88081@ithaqua.etoilebsd.net>
In-Reply-To: <60A32BCE-756A-4A0D-A24D-7AC42F71BD1A@netasq.com>
References:  <0D822C75-7240-42E3-8780-18CABC9C45A1@netasq.com> <20120903212340.GE88081@ithaqua.etoilebsd.net> <60A32BCE-756A-4A0D-A24D-7AC42F71BD1A@netasq.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <module>
    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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120904192320.GF88081>