Date: Mon, 23 Apr 2012 08:55:21 +0200 From: Monthadar Al Jaberi <monthadar@gmail.com> To: Adrian Chadd <adrian@freebsd.org> Cc: monthadar@freebsd.org, freebsd-current <freebsd-current@freebsd.org>, Fabien Thomas <fabient@freebsd.org>, freebsd-mips@freebsd.org Subject: Re: svn commit: r233628 - in head: lib/libpmc sys/amd64/amd64 sys/amd64/include sys/arm/include sys/conf sys/dev/hwpmc sys/i386/i386 sys/i386/include sys/kern sys/mips/include sys/modules/hwpmc sys/pow... Message-ID: <CA%2BsBSoJ_5OrgeD_K%2BpM18%2BW9MomYTiierrD8bvZ0Kk4t6su=AQ@mail.gmail.com> In-Reply-To: <CAJ-Vmok-JHRsnwh5j2vnw54ccVSDOoYHCut_N9wfohsQSvOaZA@mail.gmail.com> References: <201203282058.q2SKwVsJ053900@svn.freebsd.org> <CAJ-Vmok-JHRsnwh5j2vnw54ccVSDOoYHCut_N9wfohsQSvOaZA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--f46d0444044c3a938f04be531f69 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Apr 23, 2012 at 8:44 AM, Adrian Chadd <adrian@freebsd.org> wrote: > Hi Fabien, > > I've heard some rumours that this broke hwpmc support for mips24k. > > Monthadar, can you please provide some background info for this? > This is the log output Using default protocol (TFTP) Entry point: 0x80050100, address range: 0x80050000-0x804f1dcc RedBoot> exec Now booting linux kernel: Base address 0x80050000 Entry 0x80050100 memsize=3D0x08000000 modetty0=3D0,n,8,1,hw board=3DRouterStation PRO ethaddr=3D00.15.6d.c8.c9.2e CPU platform: Atheros AR7161 rev 2 CPU Frequency=3D720 MHz CPU DDR Frequency=3D360 MHz CPU AHB Frequency=3D180 MHz platform frequency: 720000000 arguments: a0 =3D 00000002 a1 =3D 80050028 a2 =3D 80050000 a3 =3D 00000001 Cmd line: =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDm= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD_}=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=DF=BEq=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=7F=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=DF=BF=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD_=EF=BF=BDw=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=1F=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= ?-=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD{=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD~=EF=BF=BD=EF=BF=BD Environment: memsize =3D 0x08000000 modetty0 =3D 0,n,8,1,hw ethaddr =3D 00.15.6d.c8.c9.2e board =3D RouterStation PRO Cache info: picache_stride =3D 4096 picache_loopcount =3D 16 pdcache_stride =3D 4096 pdcache_loopcount =3D 8 cpu0: MIPS Technologies processor v116.147 MMU: Standard TLB, 16 entries L1 i-cache: 4 ways of 512 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line Config1=3D0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG> Config3=3D0x20 KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #12: Fri Apr 20 18:03:16 CEST 2012 root@freebsd-re-9:/usr/obj/mips.mips/usr/src/sys/RSPRO_USB_PROD mips WARNING: WITNESS option enabled, expect reduced performance. MEMGUARD DEBUGGING ALLOCATOR INITIALIZED: MEMGUARD map base: 0xc0800000 MEMGUARD map limit: 0xc1c00000 MEMGUARD map size: 20480 KBytes real memory =3D 134217728 (131072K bytes) avail memory =3D 123117568 (117MB) random device not loaded; using insecure entropy nexus0: <MIPS32 root nexus> clock0: <Generic MIPS32 ticker> on nexus0 Timecounter "MIPS32" frequency 360000000 Hz quality 800 Event timer "MIPS32" frequency 360000000 Hz quality 800 apb0 at irq 4 on nexus0 uart0: <16550 or compatible> on apb0 uart0: console (115200,n,8,1) gpio0: <Atheros AR71XX GPIO driver> on apb0 gpio0: [GIANT-LOCKED] gpio0: gpio pinmask=3D0x0 gpioc0: <GPIO controller> on gpio0 gpiobus0: <GPIO bus> on gpio0 ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000000-0x1bffffff irq 1 on nexus0 usbus0: set host controller mode usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0 on ehci0 pcib0 at irq 0 on nexus0 pci0: <PCI bus> on pcib0 pci0: <old, non-VGA display device> at device 0.0 (no driver attached) ath0: <Atheros 5413> irq 0 at device 17.0 on pci0 ath0: AR5413 mac 10.5 RF5413 phy 6.1 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0063 arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: No PHY specified, using mask 16 miibus0: <MII bus> on arge0 ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto arge0: Ethernet address: 00:15:6d:c8:c9:2e arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0 arge1: No PHY specified, using mask 15 arge1: Ethernet address: 00:15:6d:c8:c9:2f spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0 spibus0: <spibus bus> on spi0 mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0 mx25l0: mx25ll128, sector 65536 bytes, 256 sectors ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0 Timecounters tick every 1.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Atheros> at usbus0 uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0 panic: [pmc,4816] npmc miscomputed: ri=3D0, md->npmc=3D2 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x4c: lui at,0x8050 db> tr Tracing pid 0 tid 100000 td 0x804f76d0 db_trace_thread+30 (?,?,?,?) ra 8068b94800000018 sp 0 sz 0 80075adc+114 (0,?,ffffffff,?) ra 8068b96000000020 sp 100000000 sz 1 80074e24+388 (?,?,?,?) ra 8068b980000000a8 sp 0 sz 0 db_command_loop+70 (?,?,?,?) ra 8068ba2800000018 sp 0 sz 0 80077900+f4 (?,?,?,?) ra 8068ba40000001a8 sp 0 sz 0 kdb_trap+110 (?,?,?,?) ra 8068bbe800000030 sp 0 sz 0 trap+c7c (?,?,?,?) ra 8068bc18000000b8 sp 0 sz 0 MipsKernGenException+134 (0,4,8043b1d4,119) ra 8068bcd0000000c8 sp 100000001 sz 1 kdb_enter+4c (?,?,?,?) ra 8068bd9800000018 sp 0 sz 0 panic+11c (?,12d0,0,2) ra 8068bdb000000028 sp 1 sz 1 800e8ca8+274 (?,?,?,?) ra 8068bdd800000038 sp 0 sz 0 syscall_module_handler+b8 (?,?,?,?) ra 8068be1000000028 sp 0 sz 0 module_register_init+9c (?,?,?,?) ra 8068be3800000028 sp 0 sz 0 mi_startup+138 (?,?,?,?) ra 8068be6000000020 sp 0 sz 0 _start+90 (?,?,?,?) ra 8068be8000000000 sp 0 sz 0 pid 0 db> > Thanks, > > > > adrian > > On 28 March 2012 13:58, Fabien Thomas <fabient@freebsd.org> wrote: >> Author: fabient >> Date: Wed Mar 28 20:58:30 2012 >> New Revision: 233628 >> URL: http://svn.freebsd.org/changeset/base/233628 >> >> Log: >> =C2=A0Add software PMC support. >> >> =C2=A0New kernel events can be added at various location for sampling or= counting. >> =C2=A0This will for example allow easy system profiling whatever the pro= cessor is >> =C2=A0with known tools like pmcstat(8). >> >> =C2=A0Simultaneous usage of software PMC and hardware PMC is possible, f= or example >> =C2=A0looking at the lock acquire failure, page fault while sampling on >> =C2=A0instructions. >> >> =C2=A0Sponsored by: NETASQ >> =C2=A0MFC after: =C2=A0 =C2=A01 month >> >> Added: >> =C2=A0head/lib/libpmc/pmc.soft.3 =C2=A0 (contents, props changed) >> =C2=A0head/sys/dev/hwpmc/hwpmc_soft.c =C2=A0 (contents, props changed) >> =C2=A0head/sys/dev/hwpmc/hwpmc_soft.h =C2=A0 (contents, props changed) >> Modified: >> =C2=A0head/lib/libpmc/Makefile >> =C2=A0head/lib/libpmc/libpmc.c >> =C2=A0head/lib/libpmc/pmc.3 >> =C2=A0head/lib/libpmc/pmc.atom.3 >> =C2=A0head/lib/libpmc/pmc.core.3 >> =C2=A0head/lib/libpmc/pmc.core2.3 >> =C2=A0head/lib/libpmc/pmc.corei7.3 >> =C2=A0head/lib/libpmc/pmc.corei7uc.3 >> =C2=A0head/lib/libpmc/pmc.iaf.3 >> =C2=A0head/lib/libpmc/pmc.k7.3 >> =C2=A0head/lib/libpmc/pmc.k8.3 >> =C2=A0head/lib/libpmc/pmc.mips24k.3 >> =C2=A0head/lib/libpmc/pmc.octeon.3 >> =C2=A0head/lib/libpmc/pmc.p4.3 >> =C2=A0head/lib/libpmc/pmc.p5.3 >> =C2=A0head/lib/libpmc/pmc.p6.3 >> =C2=A0head/lib/libpmc/pmc.sandybridge.3 >> =C2=A0head/lib/libpmc/pmc.sandybridgeuc.3 >> =C2=A0head/lib/libpmc/pmc.tsc.3 >> =C2=A0head/lib/libpmc/pmc.ucf.3 >> =C2=A0head/lib/libpmc/pmc.westmere.3 >> =C2=A0head/lib/libpmc/pmc.westmereuc.3 >> =C2=A0head/lib/libpmc/pmc.xscale.3 >> =C2=A0head/lib/libpmc/pmclog.c >> =C2=A0head/lib/libpmc/pmclog.h >> =C2=A0head/sys/amd64/amd64/trap.c >> =C2=A0head/sys/amd64/include/pmc_mdep.h >> =C2=A0head/sys/arm/include/pmc_mdep.h >> =C2=A0head/sys/conf/files >> =C2=A0head/sys/dev/hwpmc/hwpmc_amd.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_core.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_intel.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_logging.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_mips.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_mod.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_piv.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_powerpc.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_ppro.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_tsc.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_x86.c >> =C2=A0head/sys/dev/hwpmc/hwpmc_xscale.c >> =C2=A0head/sys/dev/hwpmc/pmc_events.h >> =C2=A0head/sys/i386/i386/trap.c >> =C2=A0head/sys/i386/include/pmc_mdep.h >> =C2=A0head/sys/kern/kern_clock.c >> =C2=A0head/sys/kern/kern_lock.c >> =C2=A0head/sys/kern/kern_mutex.c >> =C2=A0head/sys/kern/kern_pmc.c >> =C2=A0head/sys/kern/kern_rwlock.c >> =C2=A0head/sys/kern/kern_sx.c >> =C2=A0head/sys/kern/subr_trap.c >> =C2=A0head/sys/mips/include/pmc_mdep.h >> =C2=A0head/sys/modules/hwpmc/Makefile >> =C2=A0head/sys/powerpc/include/pmc_mdep.h >> =C2=A0head/sys/sys/pmc.h >> =C2=A0head/sys/sys/pmckern.h >> =C2=A0head/sys/sys/pmclog.h >> =C2=A0head/usr.sbin/pmcstat/pmcstat_log.c >> >> Modified: head/lib/libpmc/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/Makefile =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/Makefile =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -20,6 +20,7 @@ MAN+=3D pmc_read.3 >> =C2=A0MAN+=3D =C2=A0pmc_set.3 >> =C2=A0MAN+=3D =C2=A0pmc_start.3 >> =C2=A0MAN+=3D =C2=A0pmclog.3 >> +MAN+=3D =C2=A0pmc.soft.3 >> >> =C2=A0# PMC-dependent manual pages >> =C2=A0.if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" >> >> Modified: head/lib/libpmc/libpmc.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/libpmc.c =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/libpmc.c =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -77,11 +77,12 @@ static int tsc_allocate_pmc(enum pmc_eve >> =C2=A0static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec, >> =C2=A0 =C2=A0 struct pmc_op_pmcallocate *_pmc_config); >> =C2=A0#endif >> - >> =C2=A0#if defined(__mips__) >> =C2=A0static int mips_allocate_pmc(enum pmc_event _pe, char* ctrspec, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct pmc_op_pmcallocate *_pmc_config); >> =C2=A0#endif /* __mips__ */ >> +static int soft_allocate_pmc(enum pmc_event _pe, char *_ctrspec, >> + =C2=A0 =C2=A0struct pmc_op_pmcallocate *_pmc_config); >> >> =C2=A0#if defined(__powerpc__) >> =C2=A0static int ppc7450_allocate_pmc(enum pmc_event _pe, char* ctrspec, >> @@ -156,6 +157,8 @@ PMC_CLASSDEP_TABLE(octeon, OCTEON); >> =C2=A0PMC_CLASSDEP_TABLE(ucf, UCF); >> =C2=A0PMC_CLASSDEP_TABLE(ppc7450, PPC7450); >> >> +static struct pmc_event_descr soft_event_table[PMC_EV_DYN_COUNT]; >> + >> =C2=A0#undef __PMC_EV_ALIAS >> =C2=A0#define =C2=A0 =C2=A0 =C2=A0 =C2=A0__PMC_EV_ALIAS(N,CODE) =C2=A0{ = N, PMC_EV_##CODE }, >> >> @@ -215,21 +218,22 @@ static const struct pmc_event_descr west >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_CLASS_##C, __= VA_ARGS__ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0\ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> >> -PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF= , PMC_CLASS_UCP); >> -PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLAS= S_UCF, PMC_CLASS_UCP); >> -PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_U= CF, PMC_CLASS_UCP); >> -PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(p5, P5, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(p6, P6, PMC_CLASS_TSC); >> -PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_XSCALE); >> -PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_MIPS24K); >> -PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_OCTEON); >> -PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_PPC7450); >> +PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC)= ; >> +PMC_MDEP_TABLE(core, IAP, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC= ); >> +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TS= C, PMC_CLASS_UCF, PMC_CLASS_UCP); >> +PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLA= SS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); >> +PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_= TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); >> +PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); >> +PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); >> +PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); >> +PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); >> +PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); >> +PMC_MDEP_TABLE(generic, SOFT, PMC_CLASS_SOFT); >> >> =C2=A0static const struct pmc_event_descr tsc_event_table[] =3D >> =C2=A0{ >> @@ -279,16 +283,24 @@ PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc) >> =C2=A0#if =C2=A0 =C2=A0defined(__XSCALE__) >> =C2=A0PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); >> =C2=A0#endif >> - >> =C2=A0#if defined(__mips__) >> =C2=A0PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); >> =C2=A0PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); >> =C2=A0#endif /* __mips__ */ >> - >> =C2=A0#if defined(__powerpc__) >> =C2=A0PMC_CLASS_TABLE_DESC(ppc7450, PPC7450, ppc7450, ppc7450); >> =C2=A0#endif >> >> +static struct pmc_class_descr soft_class_table_descr =3D >> +{ >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_name =C2=A0=3D "SOFT-", >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_name_size =3D sizeof("SOFT-") - 1, >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_class =3D PMC_CLASS_SOFT, >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_event_table =3D NULL, >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_event_table_size =3D 0, >> + =C2=A0 =C2=A0 =C2=A0 .pm_evc_allocate_pmc =3D soft_allocate_pmc >> +}; >> + >> =C2=A0#undef PMC_CLASS_TABLE_DESC >> >> =C2=A0static const struct pmc_class_descr **pmc_class_table; >> @@ -343,9 +355,12 @@ static const char * pmc_state_names[] =3D >> =C2=A0 =C2=A0 =C2=A0 =C2=A0__PMC_STATES() >> =C2=A0}; >> >> -static int pmc_syscall =3D -1; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* fi= lled in by pmc_init() */ >> - >> -static struct pmc_cpuinfo cpu_info; =C2=A0 =C2=A0/* filled in by pmc_in= it() */ >> +/* >> + * Filled in by pmc_init(). >> + */ >> +static int pmc_syscall =3D -1; >> +static struct pmc_cpuinfo cpu_info; >> +static struct pmc_op_getdyneventinfo soft_event_info; >> >> =C2=A0/* Event masks for events */ >> =C2=A0struct pmc_masks { >> @@ -2179,6 +2194,25 @@ tsc_allocate_pmc(enum pmc_event pe, char >> =C2=A0} >> =C2=A0#endif >> >> +static struct pmc_event_alias generic_aliases[] =3D { >> + =C2=A0 =C2=A0 =C2=A0 EV_ALIAS("instructions", =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"SOFT-CLOCK.HARD"), >> + =C2=A0 =C2=A0 =C2=A0 EV_ALIAS(NULL, NULL) >> +}; >> + >> +static int >> +soft_allocate_pmc(enum pmc_event pe, char *ctrspec, >> + =C2=A0 =C2=A0struct pmc_op_pmcallocate *pmc_config) >> +{ >> + =C2=A0 =C2=A0 =C2=A0 (void)ctrspec; >> + =C2=A0 =C2=A0 =C2=A0 (void)pmc_config; >> + >> + =C2=A0 =C2=A0 =C2=A0 if (pe < PMC_EV_SOFT_FIRST || pe > PMC_EV_SOFT_LA= ST) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (-1); >> + >> + =C2=A0 =C2=A0 =C2=A0 pmc_config->pm_caps |=3D (PMC_CAP_READ | PMC_CAP_= WRITE); >> + =C2=A0 =C2=A0 =C2=A0 return (0); >> +} >> + >> =C2=A0#if =C2=A0 =C2=A0defined(__XSCALE__) >> >> =C2=A0static struct pmc_event_alias xscale_aliases[] =3D { >> @@ -2663,6 +2697,10 @@ pmc_event_names_of_class(enum pmc_class >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev =3D ppc7450_ev= ent_table; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0count =3D PMC_EVE= NT_TABLE_SIZE(ppc7450); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> + =C2=A0 =C2=A0 =C2=A0 case PMC_CLASS_SOFT: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ev =3D soft_event_tab= le; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 count =3D soft_event_= info.pm_nevent; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0default: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0errno =3D EINVAL; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (-1); >> @@ -2676,6 +2714,7 @@ pmc_event_names_of_class(enum pmc_class >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0for (;count--; ev++, names++) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*names =3D ev->pm= _ev_name; >> + >> =C2=A0 =C2=A0 =C2=A0 =C2=A0return (0); >> =C2=A0} >> >> @@ -2780,11 +2819,34 @@ pmc_init(void) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_class_table[n= ] =3D NULL; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0* Get soft events list. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ >> + =C2=A0 =C2=A0 =C2=A0 soft_event_info.pm_class =3D PMC_CLASS_SOFT; >> + =C2=A0 =C2=A0 =C2=A0 if (PMC_CALL(GETDYNEVENTINFO, &soft_event_info) <= 0) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (pmc_syscall = =3D -1); >> + >> + =C2=A0 =C2=A0 =C2=A0 /* Map soft events to static list. */ >> + =C2=A0 =C2=A0 =C2=A0 for (n =3D 0; n < soft_event_info.pm_nevent; n++)= { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_event_table[n].p= m_ev_name =3D >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_ev= ent_info.pm_events[n].pm_ev_name; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_event_table[n].p= m_ev_code =3D >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_ev= ent_info.pm_events[n].pm_ev_code; >> + =C2=A0 =C2=A0 =C2=A0 } >> + =C2=A0 =C2=A0 =C2=A0 soft_class_table_descr.pm_evc_event_table_size = =3D \ >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_event_info.pm_nevent; >> + =C2=A0 =C2=A0 =C2=A0 soft_class_table_descr.pm_evc_event_table =3D \ >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 soft_event_table; >> + >> + =C2=A0 =C2=A0 =C2=A0 /* >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Fill in the class table. >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0n =3D 0; >> + >> + =C2=A0 =C2=A0 =C2=A0 /* Fill soft events information. */ >> + =C2=A0 =C2=A0 =C2=A0 pmc_class_table[n++] =3D &soft_class_table_descr; >> =C2=A0#if defined(__amd64__) || defined(__i386__) >> - =C2=A0 =C2=A0 =C2=A0 pmc_class_table[n++] =3D &tsc_class_table_descr; >> + =C2=A0 =C2=A0 =C2=A0 if (cpu_info.pm_cputype !=3D PMC_CPU_GENERIC) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_class_table[n++] = =3D &tsc_class_table_descr; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Check if this CPU has fixed function count= ers. >> @@ -2867,6 +2929,9 @@ pmc_init(void) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_class_table[n= ] =3D &p4_class_table_descr; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> =C2=A0#endif >> + =C2=A0 =C2=A0 =C2=A0 case PMC_CPU_GENERIC: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMC_MDEP_INIT(generic= ); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> =C2=A0#if defined(__XSCALE__) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0case PMC_CPU_INTEL_XSCALE: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_INIT(xsc= ale); >> @@ -3035,18 +3100,19 @@ _pmc_name_of_event(enum pmc_event pe, en >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0evfence =3D xscal= e_event_table + PMC_EVENT_TABLE_SIZE(xscale); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (pe >=3D PMC_EV_MIPS24K_FIRST && pe= <=3D PMC_EV_MIPS24K_LAST) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev =3D mips24k_ev= ent_table; >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 evfence =3D mips24k_e= vent_table + PMC_EVENT_TABLE_SIZE(mips24k >> -); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 evfence =3D mips24k_e= vent_table + PMC_EVENT_TABLE_SIZE(mips24k); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (pe >=3D PMC_EV_OCTEON_FIRST && pe = <=3D PMC_EV_OCTEON_LAST) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev =3D octeon_eve= nt_table; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0evfence =3D octeo= n_event_table + PMC_EVENT_TABLE_SIZE(octeon); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (pe >=3D PMC_EV_PPC7450_FIRST && pe= <=3D PMC_EV_PPC7450_LAST) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev =3D ppc7450_ev= ent_table; >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 evfence =3D ppc7450_e= vent_table + PMC_EVENT_TABLE_SIZE(ppc7450 >> -); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 evfence =3D ppc7450_e= vent_table + PMC_EVENT_TABLE_SIZE(ppc7450); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (pe =3D=3D PMC_EV_TSC_TSC) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev =3D tsc_event_= table; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0evfence =3D tsc_e= vent_table + PMC_EVENT_TABLE_SIZE(tsc); >> + =C2=A0 =C2=A0 =C2=A0 } else if (pe >=3D PMC_EV_SOFT_FIRST && pe <=3D P= MC_EV_SOFT_LAST) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ev =3D soft_event_tab= le; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 evfence =3D soft_even= t_table + soft_event_info.pm_nevent; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0for (; ev !=3D evfence; ev++) >> >> Modified: head/lib/libpmc/pmc.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.3 =C2=A0 =C2=A0 =C2=A0 Wed Mar 28 20:49:11 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.3 =C2=A0 =C2=A0 =C2=A0 Wed Mar 28 20:58:30 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -223,6 +223,8 @@ and >> =C2=A0CPUs. >> =C2=A0.It Li PMC_CLASS_TSC >> =C2=A0The timestamp counter on i386 and amd64 architecture CPUs. >> +.It Li PMC_CLASS_SOFT >> +Software events. >> =C2=A0.El >> =C2=A0.Ss PMC Capabilities >> =C2=A0Capabilities of performance monitoring hardware are denoted using >> @@ -525,6 +527,7 @@ API is >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 , >> >> Modified: head/lib/libpmc/pmc.atom.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.atom.3 =C2=A0Wed Mar 28 20:49:11 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.atom.3 =C2=A0Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -1176,6 +1176,7 @@ and the underlying hardware events used >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.core.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.core.3 =C2=A0Wed Mar 28 20:49:11 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.core.3 =C2=A0Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -792,6 +792,7 @@ may not count some transitions. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.core2.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.core2.3 Wed Mar 28 20:49:11 2012 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.core2.3 Wed Mar 28 20:58:30 2012 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(r233628) >> @@ -1107,6 +1107,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.corei7.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.corei7.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:49:11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.corei7.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:58:30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -1559,6 +1559,7 @@ Counts number of segment register loads. >> =C2=A0.Xr pmc.corei7uc 3 , >> =C2=A0.Xr pmc.westmere 3 , >> =C2=A0.Xr pmc.westmereuc 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.corei7uc.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.corei7uc.3 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:49:= 11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.corei7uc.3 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:58:= 30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -863,6 +863,7 @@ refreshed or needs to go into a power do >> =C2=A0.Xr pmc.corei7 3 , >> =C2=A0.Xr pmc.westmere 3 , >> =C2=A0.Xr pmc.westmereuc 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.iaf.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.iaf.3 =C2=A0 Wed Mar 28 20:49:11 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.iaf.3 =C2=A0 Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -132,6 +132,7 @@ CPU, use the event specifier >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.k7.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.k7.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.k7.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -249,6 +249,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.k8.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.k8.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.k8.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -783,6 +783,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.mips24k.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.mips24k.3 =C2=A0 =C2=A0 =C2=A0 Wed Mar 28 20:49:= 11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.mips24k.3 =C2=A0 =C2=A0 =C2=A0 Wed Mar 28 20:58:= 30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -392,6 +392,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.octeon.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.octeon.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:49:11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.octeon.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:58:30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -232,6 +232,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.p4.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.p4.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.p4.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -1208,6 +1208,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.k8 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.p5.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.p5.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.p5.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -444,6 +444,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.k8 3 , >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.p6.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.p6.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.p6.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -1010,6 +1010,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc.k8 3 , >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> >> Modified: head/lib/libpmc/pmc.sandybridge.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.sandybridge.3 =C2=A0 Wed Mar 28 20:49:11 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.sandybridge.3 =C2=A0 Wed Mar 28 20:58:30 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -907,6 +907,7 @@ Split locks in SQ. >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> =C2=A0.Xr pmc.sandybridgeuc 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc.ucf 3 , >> =C2=A0.Xr pmc.westmere 3 , >> >> Modified: head/lib/libpmc/pmc.sandybridgeuc.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.sandybridgeuc.3 Wed Mar 28 20:49:11 2012 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.sandybridgeuc.3 Wed Mar 28 20:58:30 2012 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -208,6 +208,7 @@ Counts the number of core-outgoing entri >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> =C2=A0.Xr pmc.sandybridge 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc.ucf 3 , >> =C2=A0.Xr pmc.westmere 3 , >> >> Added: head/lib/libpmc/pmc.soft.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- /dev/null =C2=A0 00:00:00 1970 =C2=A0 (empty, because file is newly = added) >> +++ head/lib/libpmc/pmc.soft.3 =C2=A0Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -0,0 +1,104 @@ >> +.\" Copyright (c) 2012 Fabien Thomas. =C2=A0All rights reserved. >> +.\" >> +.\" Redistribution and use in source and binary forms, with or without >> +.\" modification, are permitted provided that the following conditions >> +.\" are met: >> +.\" 1. Redistributions of source code must retain the above copyright >> +.\" =C2=A0 =C2=A0notice, this list of conditions and the following disc= laimer. >> +.\" 2. Redistributions in binary form must reproduce the above copyrigh= t >> +.\" =C2=A0 =C2=A0notice, this list of conditions and the following disc= laimer in the >> +.\" =C2=A0 =C2=A0documentation and/or other materials provided with the= distribution. >> +.\" >> +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND >> +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, T= HE >> +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE >> +.\" ARE DISCLAIMED. =C2=A0IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS = BE LIABLE >> +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQ= UENTIAL >> +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE G= OODS >> +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTIO= N) >> +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,= STRICT >> +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN A= NY WAY >> +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY= OF >> +.\" SUCH DAMAGE. >> +.\" >> +.\" $FreeBSD$ >> +.\" >> +.Dd March 28, 2012 >> +.Os >> +.Dt PMC.SOFT 3 >> +.Sh NAME >> +.Nm pmc.soft >> +.Nd measurements using software based events >> +.Sh LIBRARY >> +.Lb libpmc >> +.Sh SYNOPSIS >> +.In pmc.h >> +.Sh DESCRIPTION >> +Software events are used to collect various source of software events. >> +.Ss PMC Features >> +16 sampling counters using software events based on various sources. >> +These PMCs support the following capabilities: >> +.Bl -column "PMC_CAP_INTERRUPT" "Support" >> +.It Em Capability Ta Em Support >> +.It PMC_CAP_CASCADE Ta \&No >> +.It PMC_CAP_EDGE Ta \&No >> +.It PMC_CAP_INTERRUPT Ta Yes >> +.It PMC_CAP_INVERT Ta \&No >> +.It PMC_CAP_READ Ta Yes >> +.It PMC_CAP_PRECISE Ta \&No >> +.It PMC_CAP_SYSTEM Ta Yes >> +.It PMC_CAP_TAGGING Ta \&No >> +.It PMC_CAP_THRESHOLD Ta \&No >> +.It PMC_CAP_USER Ta Yes >> +.It PMC_CAP_WRITE Ta Yes >> +.El >> +.Ss Event Qualifiers >> +There is no supported event qualifier. >> +.Pp >> +The event specifiers supported by software are: >> +.Bl -tag -width indent >> +.It Li CLOCK.HARD >> +Hard clock ticks. >> +.It Li CLOCK.STAT >> +Stat clock ticks. >> +.It Li LOCK.FAILED >> +Lock acquisition failed. >> +.It Li PAGE_FAULT.ALL >> +All page fault type. >> +.It Li PAGE_FAULT.READ >> +Read page fault. >> +.It Li PAGE_FAULT.WRITE >> +Write page fault. >> +.El >> +.Sh SEE ALSO >> +.Xr pmc 3 , >> +.Xr pmc.atom 3 , >> +.Xr pmc.core 3 , >> +.Xr pmc.iaf 3 , >> +.Xr pmc.ucf 3 , >> +.Xr pmc.k7 3 , >> +.Xr pmc.k8 3 , >> +.Xr pmc.p4 3 , >> +.Xr pmc.p5 3 , >> +.Xr pmc.p6 3 , >> +.Xr pmc.corei7 3 , >> +.Xr pmc.corei7uc 3 , >> +.Xr pmc.westmereuc 3 , >> +.Xr pmc.tsc 3 , >> +.Xr pmc_cpuinfo 3 , >> +.Xr pmclog 3 , >> +.Xr hwpmc 4 >> +.Sh HISTORY >> +The >> +.Nm pmc >> +library first appeared in >> +.Fx 6.0 . >> +.Sh AUTHORS >> +The >> +.Lb libpmc >> +library was written by >> +.An "Joseph Koshy" >> +.Aq jkoshy@FreeBSD.org . >> +Software PMC was written by >> +.An "Fabien Thomas" >> +.Aq fabient@FreeBSD.org . >> >> Modified: head/lib/libpmc/pmc.tsc.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.tsc.3 =C2=A0 Wed Mar 28 20:49:11 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.tsc.3 =C2=A0 Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -68,6 +68,7 @@ maps to the TSC. >> =C2=A0.Xr pmc.p4 3 , >> =C2=A0.Xr pmc.p5 3 , >> =C2=A0.Xr pmc.p6 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmclog 3 , >> =C2=A0.Xr hwpmc 4 >> =C2=A0.Sh HISTORY >> >> Modified: head/lib/libpmc/pmc.ucf.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.ucf.3 =C2=A0 Wed Mar 28 20:49:11 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.ucf.3 =C2=A0 Wed Mar 28 20:58:30 2012 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(r233628) >> @@ -96,6 +96,7 @@ offset C0H under device number 0 and Fun >> =C2=A0.Xr pmc.corei7uc 3 , >> =C2=A0.Xr pmc.westmere 3 , >> =C2=A0.Xr pmc.westmereuc 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.westmere.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.westmere.3 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:49:= 11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.westmere.3 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:58:= 30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -1381,6 +1381,7 @@ Counts number of SID integer 64 bit shif >> =C2=A0.Xr pmc.corei7 3 , >> =C2=A0.Xr pmc.corei7uc 3 , >> =C2=A0.Xr pmc.westmereuc 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.westmereuc.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.westmereuc.3 =C2=A0 =C2=A0Wed Mar 28 20:49:11 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.westmereuc.3 =C2=A0 =C2=A0Wed Mar 28 20:58:30 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -1066,6 +1066,7 @@ disabled. >> =C2=A0.Xr pmc.corei7 3 , >> =C2=A0.Xr pmc.corei7uc 3 , >> =C2=A0.Xr pmc.westmere 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr pmc.tsc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> >> Modified: head/lib/libpmc/pmc.xscale.3 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmc.xscale.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:49:11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmc.xscale.3 =C2=A0 =C2=A0 =C2=A0 =C2=A0Wed Mar 28 2= 0:58:30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -134,6 +134,7 @@ and the underlying hardware events used. >> =C2=A0.Xr pmc 3 , >> =C2=A0.Xr pmc_cpuinfo 3 , >> =C2=A0.Xr pmclog 3 , >> +.Xr pmc.soft 3 , >> =C2=A0.Xr hwpmc 4 >> =C2=A0.Sh HISTORY >> =C2=A0The >> >> Modified: head/lib/libpmc/pmclog.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmclog.c =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmclog.c =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -369,6 +369,12 @@ pmclog_get_event(void *cookie, char **da >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D= =3D NULL) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0goto error; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> + =C2=A0 =C2=A0 =C2=A0 case PMCLOG_TYPE_PMCALLOCATEDYN: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_READ32(le,ev->= pl_u.pl_ad.pl_pmcid); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_READ32(le,ev->= pl_u.pl_ad.pl_event); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_READ32(le,ev->= pl_u.pl_ad.pl_flags); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_READSTRING(le,= ev->pl_u.pl_ad.pl_evname,PMC_NAME_MAX); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0case PMCLOG_TYPE_PMCATTACH: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCLOG_GET_PATHLE= N(pathlen,evlen,pmclog_pmcattach); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCLOG_READ32(le,= ev->pl_u.pl_t.pl_pmcid); >> >> Modified: head/lib/libpmc/pmclog.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libpmc/pmclog.h =C2=A0 =C2=A0Wed Mar 28 20:49:11 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/lib/libpmc/pmclog.h =C2=A0 =C2=A0Wed Mar 28 20:58:30 2012 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -88,6 +88,13 @@ struct pmclog_ev_pmcallocate { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_id_t =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_pmcid; >> =C2=A0}; >> >> +struct pmclog_ev_pmcallocatedyn { >> + =C2=A0 =C2=A0 =C2=A0 uint32_t =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_event; >> + =C2=A0 =C2=A0 =C2=A0 char =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_= evname[PMC_NAME_MAX]; >> + =C2=A0 =C2=A0 =C2=A0 uint32_t =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_flags; >> + =C2=A0 =C2=A0 =C2=A0 pmc_id_t =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_pmcid; >> +}; >> + >> =C2=A0struct pmclog_ev_pmcattach { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_id_t =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_pmcid; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pid_t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pl_p= id; >> @@ -146,6 +153,7 @@ struct pmclog_ev { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= map_out =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_mo; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= pcsample =C2=A0 =C2=A0 =C2=A0 pl_s; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= pmcallocate =C2=A0 =C2=A0pl_a; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct pmclog_ev_pmca= llocatedyn pl_ad; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= pmcattach =C2=A0 =C2=A0 =C2=A0pl_t; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= pmcdetach =C2=A0 =C2=A0 =C2=A0pl_d; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmclog_ev_= proccsw =C2=A0 =C2=A0 =C2=A0 =C2=A0pl_c; >> >> Modified: head/sys/amd64/amd64/trap.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/amd64/amd64/trap.c Wed Mar 28 20:49:11 2012 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(r233627) >> +++ head/sys/amd64/amd64/trap.c Wed Mar 28 20:58:30 2012 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(r233628) >> @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); >> =C2=A0#include <sys/vmmeter.h> >> =C2=A0#ifdef HWPMC_HOOKS >> =C2=A0#include <sys/pmckern.h> >> +PMC_SOFT_DEFINE( , , page_fault, all); >> +PMC_SOFT_DEFINE( , , page_fault, read); >> +PMC_SOFT_DEFINE( , , page_fault, write); >> =C2=A0#endif >> >> =C2=A0#include <vm/vm.h> >> @@ -743,8 +746,20 @@ trap_pfault(frame, usermode) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rv =3D vm_fault(m= ap, va, ftype, VM_FAULT_NORMAL); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> - =C2=A0 =C2=A0 =C2=A0 if (rv =3D=3D KERN_SUCCESS) >> + =C2=A0 =C2=A0 =C2=A0 if (rv =3D=3D KERN_SUCCESS) { >> +#ifdef HWPMC_HOOKS >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (ftype =3D=3D VM_P= ROT_READ || ftype =3D=3D VM_PROT_WRITE) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 PMC_SOFT_CALL_TF( , , page_fault, all, frame); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 if (ftype =3D=3D VM_PROT_READ) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMC_SOFT_CALL_TF( , , page_fault, read, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 frame); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 else >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMC_SOFT_CALL_TF( , , page_fault, write, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 frame); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >> +#endif >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (0); >> + =C2=A0 =C2=A0 =C2=A0 } >> =C2=A0nogo: >> =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!usermode) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (td->td_intr_n= esting_level =3D=3D 0 && >> >> Modified: head/sys/amd64/include/pmc_mdep.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/amd64/include/pmc_mdep.h =C2=A0 Wed Mar 28 20:49:11 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/amd64/include/pmc_mdep.h =C2=A0 Wed Mar 28 20:58:30 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -50,13 +50,13 @@ struct pmc_mdep; >> =C2=A0* measurement architecture have PMCs of the following classes: TSC= , >> =C2=A0* IAF, IAP, UCF and UCP. >> =C2=A0*/ >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_TSC =C2=A0 =C2= =A0 =C2=A0 =C2=A00 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_K8 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 1 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_P4 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 1 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_IAP =C2=A0 =C2= =A0 =C2=A0 =C2=A01 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_IAF =C2=A0 =C2= =A0 =C2=A0 =C2=A02 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_UCP =C2=A0 =C2= =A0 =C2=A0 =C2=A03 >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_UCF =C2=A0 =C2= =A0 =C2=A0 =C2=A04 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_TSC =C2=A0 =C2= =A0 =C2=A0 =C2=A01 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_K8 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 2 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_P4 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 2 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_IAP =C2=A0 =C2= =A0 =C2=A0 =C2=A02 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_IAF =C2=A0 =C2= =A0 =C2=A0 =C2=A03 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_UCP =C2=A0 =C2= =A0 =C2=A0 =C2=A04 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_UCF =C2=A0 =C2= =A0 =C2=A0 =C2=A05 >> >> =C2=A0/* >> =C2=A0* On the amd64 platform we support the following PMCs. >> @@ -119,6 +119,15 @@ union pmc_md_pmc { >> >> =C2=A0#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_IN_USERSPACE(va) ((va) <=3D= VM_MAXUSER_ADDRESS) >> >> +/* Build a fake kernel trapframe from current instruction pointer. */ >> +#define PMC_FAKE_TRAPFRAME(TF) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 \ >> + =C2=A0 =C2=A0 =C2=A0 do { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0\ >> + =C2=A0 =C2=A0 =C2=A0 (TF)->tf_cs =3D 0; (TF)->tf_rflags =3D 0; =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 \ >> + =C2=A0 =C2=A0 =C2=A0 __asm __volatile("movq %%rbp,%0" : "=3Dr" ((TF)->= tf_rbp)); =C2=A0 =C2=A0 =C2=A0 =C2=A0\ >> + =C2=A0 =C2=A0 =C2=A0 __asm __volatile("movq %%rsp,%0" : "=3Dr" ((TF)->= tf_rsp)); =C2=A0 =C2=A0 =C2=A0 =C2=A0\ >> + =C2=A0 =C2=A0 =C2=A0 __asm __volatile("call 1f \n\t1: pop %0" : "=3Dr"= ((TF)->tf_rip)); \ >> + =C2=A0 =C2=A0 =C2=A0 } while (0) >> + >> =C2=A0/* >> =C2=A0* Prototypes >> =C2=A0*/ >> >> Modified: head/sys/arm/include/pmc_mdep.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/arm/include/pmc_mdep.h =C2=A0 =C2=A0 Wed Mar 28 20:49:11 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/arm/include/pmc_mdep.h =C2=A0 =C2=A0 Wed Mar 28 20:58:30 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -29,7 +29,7 @@ >> =C2=A0#ifndef _MACHINE_PMC_MDEP_H_ >> =C2=A0#define =C2=A0 =C2=A0 =C2=A0 =C2=A0_MACHINE_PMC_MDEP_H_ >> >> -#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_XSCALE =C2=A0 = =C2=A0 0 >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMC_MDEP_CLASS_INDEX_XSCALE =C2=A0 = =C2=A0 1 >> =C2=A0/* >> =C2=A0* On the ARM platform we support the following PMCs. >> =C2=A0* >> >> Modified: head/sys/conf/files >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/conf/files Wed Mar 28 20:49:11 2012 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(r233627) >> +++ head/sys/conf/files Wed Mar 28 20:58:30 2012 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(r233628) >> @@ -1260,6 +1260,7 @@ dev/hme/if_hme_sbus.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 optional hme sbus >> =C2=A0dev/hptiop/hptiop.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optio= nal hptiop scbus >> =C2=A0dev/hwpmc/hwpmc_logging.c =C2=A0 =C2=A0 =C2=A0optional hwpmc >> =C2=A0dev/hwpmc/hwpmc_mod.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optional h= wpmc >> +dev/hwpmc/hwpmc_soft.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 optional hwpmc >> =C2=A0dev/ichsmb/ichsmb.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0optio= nal ichsmb >> =C2=A0dev/ichsmb/ichsmb_pci.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0optional ichsmb pci >> =C2=A0dev/ida/ida.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0optional ida >> >> Modified: head/sys/dev/hwpmc/hwpmc_amd.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_amd.c =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:49:= 11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_amd.c =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:58:= 30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -687,7 +687,8 @@ amd_intr(int cpu, struct trapframe *tf) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0wrmsr(perfctr, AM= D_RELOAD_COUNT_TO_PERFCTR_VALUE(v)); >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Restart the co= unter if logging succeeded. */ >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, pm, tf, TRAPF_USERMODE(tf)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, PMC_HR, pm, tf, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TRAPF_U= SERMODE(tf)); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D = 0) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0wrmsr(evsel, config | AMD_PMC_ENABLE); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> @@ -874,7 +875,7 @@ amd_pcpu_fini(struct pmc_mdep *md, int c >> =C2=A0struct pmc_mdep * >> =C2=A0pmc_amd_initialize(void) >> =C2=A0{ >> - =C2=A0 =C2=A0 =C2=A0 int classindex, error, i, nclasses, ncpus; >> + =C2=A0 =C2=A0 =C2=A0 int classindex, error, i, ncpus; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmc_classdep *pcd; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0enum pmc_cputype cputype; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmc_mdep *pmc_mdep; >> @@ -926,12 +927,9 @@ pmc_amd_initialize(void) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * These processors have two classes of PMCs:= the TSC and >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * programmable PMCs. >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> - =C2=A0 =C2=A0 =C2=A0 nclasses =3D 2; >> - =C2=A0 =C2=A0 =C2=A0 pmc_mdep =3D malloc(sizeof(struct pmc_mdep) + ncl= asses * sizeof (struct pmc_classdep), >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 M_PMC, M_WAITOK|M_ZERO); >> + =C2=A0 =C2=A0 =C2=A0 pmc_mdep =3D pmc_mdep_alloc(2); >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_mdep->pmd_cputype =3D cputype; >> - =C2=A0 =C2=A0 =C2=A0 pmc_mdep->pmd_nclass =C2=A0=3D nclasses; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0ncpus =3D pmc_cpu_max(); >> >> >> Modified: head/sys/dev/hwpmc/hwpmc_core.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_core.c =C2=A0 =C2=A0 Wed Mar 28 20:49:11 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_core.c =C2=A0 =C2=A0 Wed Mar 28 20:58:30 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -2239,7 +2239,7 @@ core_intr(int cpu, struct trapframe *tf) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (pm->pm_state = !=3D PMC_STATE_RUNNING) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0continue; >> >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, pm, tf, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, PMC_HR, pm, tf, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TRA= PF_USERMODE(tf)); >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0v =3D pm->pm_sc.p= m_reloadcount; >> @@ -2326,7 +2326,7 @@ core2_intr(int cpu, struct trapframe *tf >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0!PM= C_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0continue; >> >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, pm, tf, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, PMC_HR, pm, tf, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TRA= PF_USERMODE(tf)); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0intrenable &=3D ~flag; >> @@ -2354,7 +2354,7 @@ core2_intr(int cpu, struct trapframe *tf >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0!PM= C_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0continue; >> >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, pm, tf, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, PMC_HR, pm, tf, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TRA= PF_USERMODE(tf)); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0intrenable &=3D ~flag; >> >> Modified: head/sys/dev/hwpmc/hwpmc_intel.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_intel.c =C2=A0 =C2=A0Wed Mar 28 20:49:11 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_intel.c =C2=A0 =C2=A0Wed Mar 28 20:58:30 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -162,12 +162,10 @@ pmc_intel_initialize(void) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (NULL); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> >> - =C2=A0 =C2=A0 =C2=A0 pmc_mdep =3D malloc(sizeof(struct pmc_mdep) + ncl= asses * >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(struct pmc_classdep), M_PMC,= M_WAITOK|M_ZERO); >> + =C2=A0 =C2=A0 =C2=A0 /* Allocate base class and initialize machine dep= endent struct */ >> + =C2=A0 =C2=A0 =C2=A0 pmc_mdep =3D pmc_mdep_alloc(nclasses); >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_mdep->pmd_cputype =C2=A0 =C2=A0=3D cputyp= e; >> - =C2=A0 =C2=A0 =C2=A0 pmc_mdep->pmd_nclass =C2=A0 =C2=A0 =3D nclasses; >> - >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_mdep->pmd_switch_in =C2=A0=3D intel_switc= h_in; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_mdep->pmd_switch_out =3D intel_switch_out= ; >> >> >> Modified: head/sys/dev/hwpmc/hwpmc_logging.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_logging.c =C2=A0Wed Mar 28 20:49:11 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_logging.c =C2=A0Wed Mar 28 20:58:30 2012 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -129,6 +129,7 @@ static struct mtx pmc_kthread_mtx; =C2=A0/* sl >> >> =C2=A0/* Emit a string. =C2=A0Caution: does NOT update _le, so needs to = be last */ >> =C2=A0#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCLOG_EMITSTRING(S,L) =C2=A0do= { bcopy((S), _le, (L)); } while (0) >> +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCLOG_EMITNULLSTRING(L) do { bzero(= _le, (L)); } while (0) >> >> =C2=A0#define =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCLOG_DESPATCH(PO) =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pmclog_release((P= O)); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \ >> @@ -835,16 +836,33 @@ void >> =C2=A0pmclog_process_pmcallocate(struct pmc *pm) >> =C2=A0{ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0struct pmc_owner *po; >> + =C2=A0 =C2=A0 =C2=A0 struct pmc_soft *ps; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0po =3D pm->pm_owner; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0PMCDBG(LOG,ALL,1, "pm=3D%p", pm); >> >> - =C2=A0 =C2=A0 =C2=A0 PMCLOG_RESERVE(po, PMCALLOCATE, sizeof(struct pmc= log_pmcallocate)); >> - =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_id); >> - =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_event); >> - =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_flags); >> - =C2=A0 =C2=A0 =C2=A0 PMCLOG_DESPATCH(po); >> + =C2=A0 =C2=A0 =C2=A0 if (PMC_TO_CLASS(pm) =3D=3D PMC_CLASS_SOFT) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_RESERVE(po, PM= CALLOCATEDYN, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(= struct pmclog_pmcallocatedyn)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= id); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= event); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= flags); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ps =3D pmc_soft_ev_ac= quire(pm->pm_event); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (ps !=3D NULL) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 PMCLOG_EMITSTRING(ps->ps_ev.pm_ev_name,PMC_NAME_MAX); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 PMCLOG_EMITNULLSTRING(PMC_NAME_MAX); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_soft_ev_release(p= s); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_DESPATCH(po); >> + =C2=A0 =C2=A0 =C2=A0 } else { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_RESERVE(po, PM= CALLOCATE, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(= struct pmclog_pmcallocate)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= id); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= event); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_EMIT32(pm->pm_= flags); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PMCLOG_DESPATCH(po); >> + =C2=A0 =C2=A0 =C2=A0 } >> =C2=A0} >> >> =C2=A0void >> >> Modified: head/sys/dev/hwpmc/hwpmc_mips.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_mips.c =C2=A0 =C2=A0 Wed Mar 28 20:49:11 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_mips.c =C2=A0 =C2=A0 Wed Mar 28 20:58:30 20= 12 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -287,7 +287,7 @@ mips_pmc_intr(int cpu, struct trapframe >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retval =3D 1; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (pm->pm_state = !=3D PMC_STATE_RUNNING) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0continue; >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, pm, tf, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D pmc_process= _interrupt(cpu, PMC_HR, pm, tf, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TRA= PF_USERMODE(tf)); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0/* Clear/disable the relevant counter */ >> >> Modified: head/sys/dev/hwpmc/hwpmc_mod.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/dev/hwpmc/hwpmc_mod.c =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:49:= 11 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233627) >> +++ head/sys/dev/hwpmc/hwpmc_mod.c =C2=A0 =C2=A0 =C2=A0Wed Mar 28 20:58:= 30 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r233628) >> @@ -70,6 +70,8 @@ __FBSDID("$FreeBSD$"); >> =C2=A0#include <vm/vm_map.h> >> =C2=A0#include <vm/vm_object.h> >> >> +#include "hwpmc_soft.h" >> + >> =C2=A0/* >> =C2=A0* Types >> =C2=A0*/ >> @@ -182,7 +184,7 @@ static int =C2=A0pmc_attach_one_process(struct >> =C2=A0static int =C2=A0 =C2=A0 pmc_can_allocate_rowindex(struct proc *p,= unsigned int ri, >> =C2=A0 =C2=A0 int cpu); >> =C2=A0static int =C2=A0 =C2=A0 pmc_can_attach(struct pmc *pm, struct pro= c *p); >> -static void =C2=A0 =C2=A0pmc_capture_user_callchain(int cpu, struct tra= pframe *tf); >> +static void =C2=A0 =C2=A0pmc_capture_user_callchain(int cpu, int soft, = struct trapframe *tf); >> =C2=A0static void =C2=A0 =C2=A0pmc_cleanup(void); >> =C2=A0static int =C2=A0 =C2=A0 pmc_detach_process(struct proc *p, struct= pmc *pm); >> =C2=A0static int =C2=A0 =C2=A0 pmc_detach_one_process(struct proc *p, st= ruct pmc *pm, >> @@ -206,7 +208,7 @@ static void pmc_process_csw_out(struct t >> =C2=A0static void =C2=A0 =C2=A0pmc_process_exit(void *arg, struct proc *= p); >> =C2=A0static void =C2=A0 =C2=A0pmc_process_fork(void *arg, struct proc *= p1, >> =C2=A0 =C2=A0 struct proc *p2, int n); >> -static void =C2=A0 =C2=A0pmc_process_samples(int cpu); >> +static void =C2=A0 =C2=A0pmc_process_samples(int cpu, int soft); >> =C2=A0static void =C2=A0 =C2=A0pmc_release_pmc_descriptor(struct pmc *pm= c); >> =C2=A0static void =C2=A0 =C2=A0pmc_remove_owner(struct pmc_owner *po); >> =C2=A0static void =C2=A0 =C2=A0pmc_remove_process_descriptor(struct pmc_= process *pp); >> @@ -218,12 +220,16 @@ static int =C2=A0 =C2=A0 =C2=A0 =C2=A0pmc_stop(str= uct pmc *pm); >> =C2=A0static int =C2=A0 =C2=A0 pmc_syscall_handler(struct thread *td, vo= id *syscall_args); >> =C2=A0static void =C2=A0 =C2=A0pmc_unlink_target_process(struct pmc *pmc= , >> =C2=A0 =C2=A0 struct pmc_process *pp); >> +static int generic_switch_in(struct pmc_cpu *pc, struct pmc_process *pp= ); >> +static int generic_switch_out(struct pmc_cpu *pc, struct pmc_process *p= p); >> +static struct pmc_mdep *pmc_generic_cpu_initialize(void); >> +static void pmc_generic_cpu_finalize(struct pmc_mdep *md); >> >> =C2=A0/* >> =C2=A0* Kernel tunables and sysctl(8) interface. >> =C2=A0*/ >> >> -SYSCTL_NODE(_kern, OID_AUTO, hwpmc, CTLFLAG_RW, 0, "HWPMC parameters"); >> +SYSCTL_DECL(_kern_hwpmc); >> >> =C2=A0static int pmc_callchaindepth =3D PMC_CALLCHAIN_DEPTH; >> =C2=A0TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "callchaindepth", &pmc_callchai= ndepth); >> @@ -1833,7 +1839,9 @@ const char *pmc_hooknames[] =3D { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0"KLDUNLOAD", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0"MMAP", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0"MUNMAP", >> - =C2=A0 =C2=A0 =C2=A0 "CALLCHAIN" >> + =C2=A0 =C2=A0 =C2=A0 "CALLCHAIN-NMI", >> + =C2=A0 =C2=A0 =C2=A0 "CALLCHAIN-SOFT", >> + =C2=A0 =C2=A0 =C2=A0 "SOFTSAMPLING" >> =C2=A0}; >> =C2=A0#endif >> >> @@ -1992,7 +2000,8 @@ pmc_hook_handler(struct thread *td, int >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * lose the inter= rupt sample. >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CPU_CLR_ATOMIC(PC= PU_GET(cpuid), &pmc_cpumask); >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_process_samples(P= CPU_GET(cpuid)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_process_samples(P= CPU_GET(cpuid), PMC_HR); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_process_samples(P= CPU_GET(cpuid), PMC_SR); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> >> >> @@ -2022,11 +2031,30 @@ pmc_hook_handler(struct thread *td, int >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0KASSERT(td =3D=3D= curthread, ("[pmc,%d] td !=3D curthread", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0__L= INE__)); >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_capture_user_call= chain(PCPU_GET(cpuid), >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_capture_user_call= chain(PCPU_GET(cpuid), PMC_HR, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(st= ruct trapframe *) arg); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0td->td_pflags &= =3D ~TDP_CALLCHAIN; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> >> + =C2=A0 =C2=A0 =C2=A0 case PMC_FN_USER_CALLCHAIN_SOFT: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Record a call= chain. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 KASSERT(td =3D=3D cur= thread, ("[pmc,%d] td !=3D curthread", >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __LINE_= _)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_capture_user_call= chain(PCPU_GET(cpuid), PMC_SR, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (struct= trapframe *) arg); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 td->td_pflags &=3D ~T= DP_CALLCHAIN; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> + >> + =C2=A0 =C2=A0 =C2=A0 case PMC_FN_SOFT_SAMPLING: >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* Call soft PMC= sampling intr. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pmc_soft_intr((struct= pmckern_soft *) arg); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> + >> =C2=A0 =C2=A0 =C2=A0 =C2=A0default: >> =C2=A0#ifdef DEBUG >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0KASSERT(0, ("[pmc= ,%d] unknown hook %d\n", __LINE__, function)); >> @@ -2221,18 +2249,17 @@ pmc_destroy_pmc_descriptor(struct pmc *p >> =C2=A0static void >> =C2=A0pmc_wait_for_pmc_idle(struct pmc *pm) >> =C2=A0{ >> -#ifdef DEBUG >> +#ifdef DEBUG >> =C2=A0 =C2=A0 =C2=A0 =C2=A0volatile int maxloop; >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0maxloop =3D 100 * pmc_cpu_max(); >> =C2=A0#endif >> - >> =C2=A0 =C2=A0 =C2=A0 =C2=A0/* >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Loop (with a forced context switch) till t= he PMC's runcount >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 * comes down to zero. >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 */ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0while (atomic_load_acq_32(&pm->pm_runcount) >= 0) { >> -#ifdef DEBUG >> +#ifdef DEBUG >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0maxloop--; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0KASSERT(maxloop >= 0, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("[= pmc,%d] (ri%d, rc%d) waiting too long for " >> @@ -2972,6 +2999,53 @@ pmc_syscall_handler(struct thread *td, v >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> >> + =C2=A0 =C2=A0 =C2=A0 /* >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0* Retrieve soft events list. >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ >> + =C2=A0 =C2=A0 =C2=A0 case PMC_OP_GETDYNEVENTINFO: >> + =C2=A0 =C2=A0 =C2=A0 { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 enum pmc_class =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cl; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 enum pmc_event =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ev; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct pmc_op_getdyne= ventinfo =C2=A0 *gei; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct pmc_dyn_event_= descr =C2=A0 =C2=A0 =C2=A0dev; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct pmc_soft =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *ps; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 uint32_t =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ne= vent; >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sx_assert(&pmc_sx, SX= _LOCKED); >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gei =3D (struct pmc_o= p_getdyneventinfo *) arg; >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((error =3D copyin= (&gei->pm_class, &cl, sizeof(cl))) !=3D 0) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 break; >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Only SOFT class is= dynamic. */ >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (cl !=3D PMC_CLASS= _SOFT) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 error =3D EINVAL; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 break; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nevent =3D 0; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (ev =3D PMC_EV_SO= FT_FIRST; ev <=3D PMC_EV_SOFT_LAST; ev++) { >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 ps =3D pmc_soft_ev_acquire(ev); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 if (ps =3D=3D NULL) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 bcopy(&ps->ps_ev, &dev, sizeof(dev)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 pmc_soft_ev_release(ps); >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 error =3D copyout(&dev, >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 &gei->pm_events[nevent], >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 sizeof(struct pmc_dyn_event_descr)); >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 if (error !=3D 0) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 nevent++; >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (error !=3D 0) >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 break; >> + >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 error =3D copyout(&ne= vent, &gei->pm_nevent, >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** --=20 Monthadar Al Jaberi --f46d0444044c3a938f04be531f69 Content-Type: application/octet-stream; name=RSPRO_USB_PROD Content-Disposition: attachment; filename=RSPRO_USB_PROD Content-Transfer-Encoding: base64 X-Attachment-Id: f_h1d67xor0 IwojIFViaXF1aXRpIFJvdXRlcnN0YXRpb24gUHJvOiBib290IGZyb20gZmlyc3QgRE9TLXBhcnRp dGlvbmVkLCBCU0QKIyBzbGljZWQgZmxhc2ggZGlzay4KIwojICRGcmVlQlNEJAojCgojCiMgQVI3 MVhYIC0tIEtlcm5lbCBjb25maWd1cmF0aW9uIGZpbGUgZm9yIEZyZWVCU0QvTUlQUyBmb3IgQXRo ZXJvcyA3MXh4IHN5c3RlbXMKIwojIFRoaXMgaW5jbHVkZXMgYWxsIHRoZSBjb21tb24gZHJpdmVy cyBmb3IgdGhlIEFSNzFYWCBib2FyZHMgYWxvbmcgd2l0aAojIHRoZSB1c2IsIG5ldDgwMjExIGFu ZCBhdGhlcm9zIGRyaXZlciBjb2RlLgojCiMgJEZyZWVCU0QkCiMKCm1hY2hpbmUJCW1pcHMgbWlw cwppZGVudAkJUlNQUk9fVVNCX1BST0QKY3B1CQlDUFVfTUlQUzRLQwptYWtlb3B0aW9ucwlLRVJO TE9BREFERFI9MHg4MDA1MDAwMApvcHRpb25zCQlIWj0xMDAwCm9wdGlvbnMJCUhXUE1DX0hPT0tT CgpmaWxlcwkJIi4uL2F0aGVyb3MvZmlsZXMuYXI3MXh4IgoKIyBGb3Igbm93LCBoaW50cyBhcmUg cGVyLWJvYXJkLgoKaGludHMJCSJBUjcxWFhfQkFTRS5oaW50cyIKCm1ha2VvcHRpb25zCURFQlVH PS1nCQkjQnVpbGQga2VybmVsIHdpdGggZ2RiKDEpIGRlYnVnIHN5bWJvbHMKCiMgQnVpbGQgdGhl c2UgYXMgbW9kdWxlcyBzbyBzbWFsbCBwbGF0Zm9ybSBidWlsZHMgd2lsbCBoYXZlIHRoZQojIG1v ZHVsZXMgYWxyZWFkeSBidWlsdC4KbWFrZW9wdGlvbnMJTU9EVUxFU19PVkVSUklERT0icmFuZG9t IGdwaW8gYXI3MXh4IGlmX2dpZiBpZl9ncmUgaWZfYnJpZGdlIGJyaWRnZXN0cCB1c2Igd2xhbiB3 bGFuX3hhdXRoIHdsYW5fYWNsIHdsYW5fd2VwIHdsYW5fdGtpcCB3bGFuX2NjbXAgd2xhbl9yc3Nh ZGFwdCB3bGFuX2FtcnIgYXRoIGF0aF9wY2kiCgpvcHRpb25zCQlEREIKb3B0aW9ucwkJS0RCCgpv cHRpb25zIEhXUE1DX0hPT0tTCmRldmljZSBod3BtYwoKb3B0aW9ucwkJU0NIRURfNEJTRAkJIzRC U0Qgc2NoZWR1bGVyCiNvcHRpb25zCQlTQ0hFRF9VTEUJCSM0QlNEIHNjaGVkdWxlcgpvcHRpb25z CQlJTkVUCQkJI0ludGVyTkVUd29ya2luZwojb3B0aW9ucwkJSU5FVDYJCQkjIElQdjYKCiMgb3B0 aW9ucwkJTkZTX0NMCQkjTmV0d29yayBGaWxlc3lzdGVtIENsaWVudAoKb3B0aW9ucwkJUFNFVURP RlMJCSNQc2V1ZG8tZmlsZXN5c3RlbSBmcmFtZXdvcmsKb3B0aW9ucwkJX0tQT1NJWF9QUklPUklU WV9TQ0hFRFVMSU5HICNQb3NpeCBQMTAwM18xQiByZWFsLXRpbWUgZXh0ZW5zaW9ucwoKIyBvcHRp b25zCQlORlNfTEVHQUNZUlBDCiMgRGVidWdnaW5nIGZvciB1c2UgaW4gLWN1cnJlbnQKb3B0aW9u cwkJSU5WQVJJQU5UUwpvcHRpb25zCQlJTlZBUklBTlRfU1VQUE9SVApvcHRpb25zCQlXSVRORVNT Cm9wdGlvbnMJCVdJVE5FU1NfU0tJUFNQSU4Kb3B0aW9ucwkJREVCVUdfUkVEWk9ORQpvcHRpb25z CQlERUJVR19NRU1HVUFSRAoKb3B0aW9ucyAgICAgICAgIEZGUyAgICAgICAgICAgICAgICAgICAg ICNCZXJrZWxleSBGYXN0IEZpbGVzeXN0ZW0KIyBvcHRpb25zICAgICAgICAgU09GVFVQREFURVMg ICAgICAgICAgICAgI0VuYWJsZSBGRlMgc29mdCB1cGRhdGVzIHN1cHBvcnQKIyBvcHRpb25zICAg ICAgICAgVUZTX0FDTCAgICAgICAgICAgICAgICAgI1N1cHBvcnQgZm9yIGFjY2VzcyBjb250cm9s IGxpc3RzCiMgb3B0aW9ucyAgICAgICAgIFVGU19ESVJIQVNIICAgICAgICAgICAgICNJbXByb3Zl IHBlcmZvcm1hbmNlIG9uIGJpZyBkaXJlY3RvcmllcwojIG9wdGlvbnMJCU1TRE9TRlMJCQkjIFJl YWQgTVNET1MgZmlsZXN5c3RlbXM7IHVzZWZ1bCBmb3IgVVNCL0NGCgpkZXZpY2UJCXBjaQpkZXZp Y2UJCWFyNzF4eF9wY2kKCiMgODAyLjExIGZyYW1ld29yawpvcHRpb25zCQlJRUVFODAyMTFfREVC VUcKb3B0aW9ucwkJSUVFRTgwMjExX0FMUQpvcHRpb25zCQlJRUVFODAyMTFfU1VQUE9SVF9NRVNI CiMgVGhpcyBvcHRpb24gaXMgY3VycmVudGx5IGJyb2tlbiBmb3IgaWZfYXRoX3R4LgpvcHRpb25z CQlJRUVFODAyMTFfU1VQUE9SVF9URE1BCm9wdGlvbnMJCUlFRUU4MDIxMV9BTVBEVV9BR0UKZGV2 aWNlCQl3bGFuICAgICAgICAgICAgIyA4MDIuMTEgc3VwcG9ydApkZXZpY2UJCXdsYW5fd2VwICAg ICAgICAjIDgwMi4xMSBXRVAgc3VwcG9ydApkZXZpY2UJCXdsYW5fY2NtcCAgICAgICAjIDgwMi4x MSBDQ01QIHN1cHBvcnQKZGV2aWNlCQl3bGFuX3RraXAgICAgICAgIyA4MDIuMTEgVEtJUCBzdXBw b3J0CmRldmljZQkJd2xhbl94YXV0aAkjIDgwMi4xMSBob3N0YXAgc3VwcG9ydAoKIyBBdGhlcm9z IHdpcmVsZXNzIE5JQ3MKZGV2aWNlCQlhdGggICAgICAgICAgICAgIyBBdGhlcm9zIGludGVyZmFj ZSBzdXBwb3J0CmRldmljZQkJYXRoX3BjaQkJIyBBdGhlcm9zIFBDSS9DYXJkYnVzIGJ1cwpvcHRp b25zIAlBVEhfREVCVUcKb3B0aW9ucwkJQVRIX0RJQUdBUEkKb3B0aW9ucwkJQVRIX0VOQUJMRV8x MU4Kb3B0aW9ucwkJQUhfREVCVUcKb3B0aW9ucwkJQUhfREVCVUdfQUxRCm9wdGlvbnMJCUFMUQpk ZXZpY2UJCWF0aF9oYWwKb3B0aW9uCQlBSF9TVVBQT1JUX0FSNTQxNgpkZXZpY2UJCWF0aF9yYXRl X3NhbXBsZQpvcHRpb24JCUFIX1JYQ0ZHX1NETUFNV180QllURVMKb3B0aW9uCQlBSF9BUjU0MTZf SU5URVJSVVBUX01JVElHQVRJT04KIyBUaGVyZSdzIG5vIERGUyByYWRhciBkZXRlY3Rpb24gc3Vw cG9ydCB5ZXQgc28gdGhpcyB3b24ndCBhY3R1YWxseQojIGRldGVjdCByYWRhcnMuICBJdCBob3dl dmVyIGRvZXMgZW5hYmxlIHRoZSByZXN0IG9mIHRoZSBjaGFubmVsIGNoYW5nZQojIG1hY2hpbmVy eSBzbyBERlMgY2FuIGJlIGRlYnVnZ2VkLgpvcHRpb24JCUFUSF9FTkFCTEVfREZTCgpkZXZpY2UJ CW1paQpkZXZpY2UJCWFyZ2UKCmRldmljZQkJdXNiCm9wdGlvbnMJCVVTQl9FSENJX0JJR19FTkRJ QU5fREVTQyAgICAgICAgIyBoYW5kbGUgYmlnLWVuZGlhbiBieXRlIG9yZGVyCm9wdGlvbnMJCVVT Ql9ERUJVRwpvcHRpb25zCQlVU0JfSE9TVF9BTElHTj0zMgkJIyBBUjcxWFggKE1JUFMgaW4gZ2Vu ZXJhbD8pIHJlcXVpcmVzIHRoaXMKZGV2aWNlCQllaGNpCgpkZXZpY2UJCXNjYnVzCmRldmljZQkJ dW1hc3MKZGV2aWNlCQlkYQoKIyBPbi1ib2FyZCBTUEkgZmxhc2gKZGV2aWNlCQlzcGlidXMKZGV2 aWNlCQlhcjcxeHhfc3BpCmRldmljZQkJbXgyNWwKZGV2aWNlCQlhcjcxeHhfd2RvZwoKZGV2aWNl CQl1YXJ0CgpkZXZpY2UJCWxvb3AKZGV2aWNlCQlldGhlcgpkZXZpY2UJCW1kCmRldmljZQkJYnBm CmRldmljZQkJcmFuZG9tCmRldmljZQkJaWZfYnJpZGdlCmRldmljZQkJZ2lmCQkjIGlwWzQ2XSBp biBpcFs0Nl0gdHVubmVsaW5nIHByb3RvY29sCmRldmljZQkJZ3JlCQkjIGdlbmVyaWMgZW5jYXBz dWxhdGlvbiAtIG9ubHkgZm9yIElQdjQgaW4gSVB2NCB0aG91Z2ggYXRtCgpvcHRpb25zCQlBUkdF X0RFQlVHCSMgRW5hYmxlIGlmX2FyZ2UgZGVidWdnaW5nIGZvciBub3cKCiMgRW5hYmxlIEdQSU8K ZGV2aWNlCQlncGlvCmRldmljZQkJZ3Bpb2xlZAoKCiMgUlRDIC0gcmVxdWlyZXMgaGFja2VyeSBp biB0aGUgc3BpYnVzIGNvZGUgdG8gd29yawpkZXZpY2UJCXBjZjIxMjNfcnRjCgojIE5ldyBOZXR3 b3JrIEZpbGVzeXN0ZW0gQ2xpZW50Cm9wdGlvbnMJCU5GU0NMCgojIEdFT00gbW9kdWxlcwpkZXZp Y2UJCWdlb21fcmVkYm9vdAkjIHRvIGdldCBhY2Nlc3MgdG8gdGhlIFNQSSBmbGFzaCBwYXJ0aXRp b25zCmRldmljZQkJZ2VvbV91emlwCSMgY29tcHJlc3NlZCBpbi1tZW1vcnkgZmlsZXN5c3RlbSBz dXBwb3J0Cm9wdGlvbnMJCUdFT01fVVpJUAoKIyBGb3IgRE9TCm9wdGlvbnMJCUdFT01fUEFSVF9C U0QKb3B0aW9ucwkJR0VPTV9QQVJUX01CUgpvcHRpb25zCQlNU0RPU0ZTCgojIEZvciBHUFQKb3B0 aW9ucwkJR0VPTV9MQUJFTApvcHRpb25zCQlHRU9NX1BBUlRfR1BUCgojIC4uIGZpcnN0IERPUy1w YXJ0aXRpb25lZCwgQlNEIHNsaWNlZCBmbGFzaCBkaXNrCiNvcHRpb25zCQlST09UREVWTkFNRT1c InVmczpkYTBzMWFcIgpvcHRpb25zCQlST09UREVWTkFNRT1cInVmczovZGV2L2dwdC9yc3Byb290 ZnNcIgoK --f46d0444044c3a938f04be531f69--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BsBSoJ_5OrgeD_K%2BpM18%2BW9MomYTiierrD8bvZ0Kk4t6su=AQ>