aboutsummaryrefslogtreecommitdiff
path: root/lib/libpmc/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* pmc(3): remove Pentium-related man pages and referencesMitchell Horne2021-08-101-3/+0
| | | | | | | | | | | Support for Pentium events was removed completely in e92a1350b50e. Don't bump .Dd where we are just removing xrefs. Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31423
* libpmc: limit pmu-events to 64-bit powerpcMitchell Horne2021-05-311-1/+1
| | | | | | | | Although currently unused, there are only pmu event definitions for POWER8 and POWER9. There is no sense in building these on 32-bit platforms. Sponsored by: The FreeBSD Foundation
* libpmc: use $MACHINE_CPUARCHMitchell Horne2021-05-311-1/+1
| | | | | | | This is preferred over $MACHINE_ARCH for these types of checks, although it makes no difference for amd64 or i386. No functional change intended. Sponsored by: The FreeBSD Foundation
* libpmc: always generate libpmc_events.cMitchell Horne2021-05-311-4/+3
| | | | | | | | | | The jevents build tool will create an empty table if it doesn't find any events, so we can remove the extra $MACHINE_CPUARCH checks. Reviewed by: gnn, ray, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30531
* libpmc: fix linking with C programsAlan Somers2021-02-151-0/+1
| | | | | | | | | | | Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Reported-by: Dom Dwyer <dom@itsallbroken.com> Reviewed By: vangyzen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28550
* PMC: remove now orphaned PMC for INTEL XScale processors.Michal Meloun2020-12-251-1/+0
| | | | Support for XScale architecture has been deleted in FreeBSD 13.
* Use MACHINE_CPUARCH when checking for arm64Andrew Turner2020-09-141-2/+2
| | | | | | | | | | | | | | | Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will simplify checks in downstream consumers targeting prototype instruction sets. The only place we check for MACHINE_ARCH == aarch64 is when building the device tree blobs. As these are targeting current generation ISAs. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26370 Notes: svn path=/head/; revision=365726
* Avoid rebuilding libpmc in every incremental rebuildAlex Richardson2020-07-151-3/+7
| | | | | | | | | | | | | Generate libpmc_events.c in a temporary file first and only overwrite it if the files are actually different. This avoids compiling and relinking the different variants of libpmc on every incremental build. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D24784 Notes: svn path=/head/; revision=363216
* libpmc: Always add the full include path for libpmcstatEmmanuel Vadot2020-03-251-2/+2
| | | | | | | Previously it was only added for aarch64, amd64 and i386 Notes: svn path=/head/; revision=359295
* pmc: Add include path for libpmcstat as it is an internallibEmmanuel Vadot2020-03-251-1/+2
| | | | | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24173 Notes: svn path=/head/; revision=359292
* Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it aroundKyle Evans2020-01-141-2/+0
| | | | | | | | | arichardson has an actual fix for the same issue that this was working around; given that we don't build with llvm today, go ahead and revert the workaround in advance. Notes: svn path=/head/; revision=356735
* Tweaks for DIRDEPS_BUILDSimon J. Gerraty2019-12-191-1/+1
| | | | | | | | | | | | | | libmagic only depend on mkmagic if not DIRDEPS_BUILD libpmc fix -I for libpmcstat local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D22872 Notes: svn path=/head/; revision=355904
* libpmc: build json event support also on arm64Ed Maste2019-12-121-1/+2
| | | | Notes: svn path=/head/; revision=355635
* Update dirdeps.mk and gendirdeps.mkSimon J. Gerraty2019-12-111-0/+8
| | | | | | | | | | | | | | | | | | | The env space consumed by exporting all libc's .meta files left little room for command line, so unexport when done. Update dirdeps.mk to latest and add dirdeps-targets.mk to simplify/update targets/Makefile Makefile changes to go with Makefile.depend changes in D22494 Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22495 Notes: svn path=/head/; revision=355618
* Merge ^/head r352764 through r353315.Dimitry Andric2019-10-081-0/+2
|\ | | | | | | Notes: svn path=/projects/clang900-import/; revision=353316
| * Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it aroundKyle Evans2019-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Diff partially stolen from CheriBSD; these bits need -Wl,-z,notext in order to build in an LLVM world. They are needed for all flavors/sizes of MIPS. This will eventually get fixed in LLVM, but it's unclear when. Reported by: arichardson, emaste Differential Revision: https://reviews.freebsd.org/D21696 Notes: svn path=/head/; revision=353140
* | Another round of attempting to squelch -Wdeprecated-declarations, whichDimitry Andric2019-09-171-0/+3
|/ | | | | | | | | | | | has become very trigger-happy with libc++ 9.0.0. It does not help that gcc's implementation of this warning is even more trigger-happy, in the sense that it already warns on the declaration itself, not when you are using it. This is very annoying with our use of -Wsystem-headers. That should really be disabled for gcc. Notes: svn path=/projects/clang900-import/; revision=352435
* pkgbase: Create a FreeBSD-utilities package and make it the default oneEmmanuel Vadot2019-09-051-1/+0
| | | | | | | | | | | | | The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21506 Notes: svn path=/head/; revision=351858
* Fix warnings with lib/libpmcEnji Cooper2019-04-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | * Use `MIN` instead of similar hand rolled macro. * Sort headers. * Use `errno.h` instead of `sys/errno.h`. * Wrap the argument to sizeof in parentheses for clarity. * Remove `__BSD_VISIBLE` and `_XOPEN_SOURCE` #defines to mute warnings about incompatible snprintf definitions. This fixes a number of warnings I've been seeing lately in my builds. Sort makefile variables per style.Makefile(9) (`CFLAGS`/`CWARNFLAG.gcc`) and bump `WARNS` to 3. MFC after: 2 weeks Reviewed by: jtl Approved by: jtl (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19851 Notes: svn path=/head/; revision=346196
* re-enable pmcstat, pmccontrol, and pmcannotate for gcc4 buildsMatt Macy2018-09-141-1/+1
| | | | | | | | | | | | I had disabled building of the aforementioned targets due to warnings breaking tinderbox. This silences the warning and restores them to the build. Reported by: jhibbits Reviewed by: jhibbits Approved by: re (gjb) Notes: svn path=/head/; revision=338676
* Revert r336773: it removed too much.Warner Losh2018-07-271-0/+1
| | | | | | | | | | r336773 removed all things xscale. However, some things xscale are really armv5. Revert that entirely. A more modest removal will follow. Noticed by: andrew@ Notes: svn path=/head/; revision=336783
* Remove xscale supportWarner Losh2018-07-271-1/+0
| | | | | | | | | | | | | The OLD XSCALE stuff hasn't been useful in a while. The original committer (cognet@) was the only one that had boards for it. He's blessed this removal. Newer XSCALE (GUMSTIX) is for hardware that's quite old. After discussion on arm@, it was clear there was no support for keeping it. Differential Review: https://reviews.freebsd.org/D16313 Notes: svn path=/head/; revision=336773
* Put in temporary hacks for jevents.Bryan Drewery2018-06-151-3/+5
| | | | | | | | | | - Handle 'make clean' - Don't try building it locally, just fail instead. jevents should really be merged into lib/libpmc/Makefile. Notes: svn path=/head/; revision=335233
* pmc gcc fixupsRyan Libby2018-06-111-0/+1
| | | | | | | | | | | Fix the build of lib/libpmc and usr.sbin/pmc for gcc on amd64. Reviewed by: mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15723 Notes: svn path=/head/; revision=334957
* pmc: convert native to jsonl and track TSC value of samplesMatt Macy2018-06-071-2/+2
| | | | | | | | | | | | | | | | | | - add '-j' options to filter to enable converting native pmc log format to json lines format to enable the use of scripts and external tooling % pmc filter -j pmc.log pmc.jsonl - Record the tsc value in sampling interrupts as opposed to recording nanotime when the sample is copied to a global log in hardclock - potentially many milliseconds later. - At initialize record the tsc_freq and the time of day to give us an offset for translating the tsc values in callchain records Notes: svn path=/head/; revision=334749
* libpmc/pmu: enable for i386 as wellMatt Macy2018-05-311-4/+4
| | | | Notes: svn path=/head/; revision=334455
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-261-1/+23
| | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Notes: svn path=/head/; revision=334244
* Revert r334242 "pmc(3)/hwpmc(4): update supported Intel processors to rely ↵Matt Macy2018-05-261-23/+1
| | | | | | | | | fully on the" because of squash commit messages Notes: svn path=/head/; revision=334243
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-261-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Squashed commit of the following: commit 4459d43eff815bec08ccc5533dbe5de846f03128 Author: Matt Macy <mmacy@mattmacy.io> Date: Sat May 26 00:06:31 2018 -0700 libpmc: fix pmu function signatures for non amd64 commit a2cb8bbc586c65d41f9b291430a2261ec67b59fe Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:38:11 2018 -0700 pmcstat: fix indentation of usage commit f686954b15ff56a833ac80404898977cb80a265b Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:49 2018 -0700 pmclog(3): add callchain and pmcallocatedyn, remove pcsample commit 73e13a0d2e9498c81c150d14d022050cee7511bb Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:00 2018 -0700 pmclog.h: GC pcsample field commit 3e93ffd65da641fa657539dad3c48e281f8b5798 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:05:57 2018 -0700 hwpmc: make Intel core CPUs use external event tables commit 634f5fae1e1644ac324003136c66cd9c619d1c93 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:00:06 2018 -0700 pmclog: update log record types, bump PMC_MAJOR - explicitly make log record types a multiple of 8 bytes - hook in pmu event types for pmc_allocate records - remove references to no longer PCSAMPLE record commit 83d84fcd2d65bdf6ddcb2e155a22f0cfa2a9c225 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 21:52:10 2018 -0700 libpmc: add support for having vendor table driven pmc_allocate commit 9e6ad63c40c2fce8404847ace5078ca6cb33a736 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:11:33 2018 -0700 hwpmc_core: add accessors for EVSEL & UMASK, make IAP_UMASK useful to user commit 859dceb93daa6419a48c794db99b6758e5b041c9 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:09:45 2018 -0700 pmcstat: update usage and man page as well as make -L consistent with pmccontrol commit 79c7d8597e28c2eb13f5f9113e65ec2792ca57b1 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 18:07:03 2018 -0700 pmu_util: add support for all current intel event keywords commit d8089c7f6a6c8527f38324252b1ffb47004694c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:45:00 2018 -0700 add description for new arguments commit 058336740bab53c62ec88a3a026ea848cf3878c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:38:15 2018 -0700 libpmc: move pmu_events table and pmu_utils out of libpmcstat so that they can be used by pmc_allocate commit 049b66b382e2f833c3f47bc8df9e750cb265709f Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:12:41 2018 -0700 pmcstat: hook pmu_events counter description utility routines in commit f5e01e7b37a691dc045e1aa16b3ebdd162515de8 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:11:59 2018 -0700 pmu_events: add utility routines for listing counters and their descriptions commit cba4d4f8907f772279f86f18f915e0d74d33ac56 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:09:50 2018 -0700 pmu-events: expand out skylake regex to simplify string matches Notes: svn path=/head/; revision=334242
* MFHGlen Barber2016-03-021-0/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * Connect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.Edward Tomasz Napierala2016-03-011-0/+1
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296263
* | First pass through library packaging.Glen Barber2016-02-041-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295278
* Update hwpmc to support core events for Atom Silvermont microarchitecture.Hiren Panchasara2014-03-201-0/+1
| | | | | | | | | | (Model 0x4D as per Intel document 330061-001 01/2014) Tested by: Olivier Cochard-Labbe <olivier@cochatrd.me> MFC after: 4 weeks Notes: svn path=/head/; revision=263446
* Always install pmc.foo(3) manpages.Ulrich Spörlein2013-05-031-12/+8
| | | | | | | | | | | There is no point in hiding, e.g. pmc.xscale(3) from a developer running on amd64, when the target arch in question will probably never have manual pages installed at all. Reviewed by: sbruno, hiren Notes: svn path=/head/; revision=250203
* Update hwpmc to support Haswell class processors.Sean Bruno2013-03-281-0/+2
| | | | | | | | | | | | | | | 0x3C: /* Per Intel document 325462-045US 01/2013. */ Add manpage to document all the goodness that is available in this processor model. Submitted by: hiren panchasara <hiren.panchasara@gmail.com> Reviewed by: jimharris, sbruno Obtained from: Yahoo! Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=248842
* Update hwpmc to support the Xeon class of Ivybridge processors.Sean Bruno2013-01-311-0/+1
| | | | | | | | | | | | | | | | | case 0x3E: /* Per Intel document 325462-045US 01/2013. */ Add manpage to document all the goodness that is available in this processor model. No support for uncore events at this time. Submitted by: hiren panchasara <hiren.panchasara@gmail.com> Reviewed by: davide, jimharris, sbruno Obtained from: Yahoo! Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=246166
* Update hwpmc to support the Xeon class of Sandybridge processors.Sean Bruno2012-10-191-0/+1
| | | | | | | | | | | | | | | | | (Model 0x2D /* Per Intel document 253669-044US 08/2012. */) Add manpage to document all the goodness that is available in this processor model. No support for uncore events at this time. Submitted by: hiren panchasara <hiren.panchasara@gmail.com> Reviewed by: jimharris@ fabient@ Obtained from: Yahoo! Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=241738
* Fix "make install"Tim Kientzle2012-10-061-1/+1
| | | | | | | | Also make arm the same as other platforms: Install man pages for all CPUs in the family. Notes: svn path=/head/; revision=241255
* Add Intel Ivy Bridge support to hwpmc(9).Fabien Thomas2012-09-061-0/+1
| | | | | | | | | | | | | Update offcore RSP token for Sandy Bridge. Note: No uncore support. Will works on Family 6 Model 3a. MFC after: 1 month Tested by: bapt, grehan Notes: svn path=/head/; revision=240164
* Add software PMC support.Fabien Thomas2012-03-281-0/+1
| | | | | | | | | | | | | | | | New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8). Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions. Sponsored by: NETASQ MFC after: 1 month Notes: svn path=/head/; revision=233628
* Update manual pages for MIPS-related CPUs:Oleksandr Tymoshenko2012-03-251-0/+3
| | | | | | | | | | | - Rename pmc.mips to pmc.mips24k since it covers just one CPU, no whole architecture - Add documetnations for Octeon's PMC counters - Remove CAVEATS section from pmc.mips24k page: PMC for MIPS supports sampling now. Notes: svn path=/head/; revision=233451
* - Add support for the Intel Sandy Bridge microarchitecture (both core and ↵Davide Italiano2012-03-011-0/+2
| | | | | | | | | | | | | | uncore counting events) - New manpages with event lists. - Add MSRs for the Intel Sandy Bridge microarchitecture Reviewed by: attilio, brueffer, fabient Approved by: gnn (mentor) MFC after: 3 weeks Notes: svn path=/head/; revision=232366
* Revert last commit: CPUTYPE will be defined hereWarner Losh2011-02-111-1/+1
| | | | Notes: svn path=/head/; revision=218532
* Don't require CPUTYPE to be defined for ARM, but use it if it is.Warner Losh2011-02-111-1/+1
| | | | Notes: svn path=/head/; revision=218531
* MFtbemd:Warner Losh2010-08-231-2/+2
| | | | | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform. Notes: svn path=/head/; revision=211725
* - Support for uncore counting events: one fixed PMC with the uncoreFabien Thomas2010-04-021-0/+5
| | | | | | | | | | | | | | | domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Notes: svn path=/head/; revision=206089
* Build lib/ with WARNS=6 by default.Ed Schouten2010-01-021-2/+0
| | | | | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway. Notes: svn path=/head/; revision=201381
* Intel XScale hwpmc(4) support.Rui Paulo2009-12-231-0/+2
| | | | | | | | | | | | | | This brings hwpmc(4) support for 2nd and 3rd generation XScale cores. Right now it's enabled by default to make sure we test this a bit. When the time comes it can be disabled by default. Tested on Gateworks boards. A man page is coming. Obtained from: //depot/user/rpaulo/xscalepmc/... Notes: svn path=/head/; revision=200928
* Install x86 related man pages on x86 systems only.Rui Paulo2009-10-041-0/+2
| | | | | | | Reviewed by: jkoshy Notes: svn path=/head/; revision=197741
* Add manual pages for performance measurement counters present inJoseph Koshy2008-10-041-0/+4
| | | | | | | Intel Atom(tm), Core(tm) and Core2(tm) CPUs. Notes: svn path=/head/; revision=183593