Commit graph

51 commits

Author SHA1 Message Date
Mitchell Horne b293497146 pmc.amd(3): rename from pmc.k8(3)
This is the first step in recognizing that the K8 microarchitecture
represents a small and aged subset of AMD CPUs supported by this class.
Future changes will update the code and documentation details to better
reflect this.

Keep the old filename as an alias.

Reviewed by:	jkoshy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41279
2023-10-18 15:05:45 -03:00
Mitchell Horne 82d6d46d0d pmc: remove last bits of AMD K7 CPU support
This includes event definitions from sys/pmc_events.h, definitions from
sys/pmc.h, and the man pages.

Reviewed by:	jkoshy
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41275
2023-10-18 15:05:45 -03:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Mitchell Horne 3977781b98 pmc: clarify and strengthen statements about API/ABI
- Make it clear that applications are not only encouraged to use the
  pmc(3) library, but use of the hwpmc(4) interface directly is a
  use-case we do not support
- Move the COMPATIBILITY section above PROGRAMMING API in hwpmc(4)
- Drop statements about the driver and library being "under development"

Reviewed by:	jkoshy, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40543
2023-06-16 13:44:54 -03:00
Joseph Koshy f401d82ef7
pmc: Keep a list sorted.
Approved by:	gnn (mentor)
Differential Revision: https://reviews.freebsd.org/D39439
2023-04-05 20:09:28 +01:00
Pau Amma 5faf9f4dff Refresh CPU types and classes from sys/sys/pmc.h.
While here, fix a few nits.

Inspired by reviewing D35342.

Sources for trademark info
- https://www.arm.com/company/policies/trademarks (no Arm8, curiously)
- https://www.ibm.com/legal/copytrade?mhsrc=ibmsearch_a&mhq=trademark

Reviewed by:	carlavilla, luporl, mhorne
Approved by:	carlavilla (mentor), mhorne (src)
Differential Revision: https://reviews.freebsd.org/D35344
2023-01-18 21:50:49 +01:00
Aleksandr Rybalko b6e28991bf System wide and NUMA domain wide counters support. PMC classes for ARM DMC-620 and CMN-600.
Add support for system wide and NUMA domain wide counters support.
Add 3 new PMC classes for ARM DMC-620 and CMN-600 controllers PMU.

Reviewed by:	mhorne
Sponsored By:	ARM
Sponsored By:	Ampere Computing
Differential Revision: https://reviews.freebsd.org/D35342
2022-06-26 08:31:03 +03:00
Mitchell Horne 99830f702d libpmc: remove mips support
Bye bye!

Reviewed by:	imp, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34083
2022-01-28 16:35:32 -04:00
Mitchell Horne d78896e46f pmc(3): remove Pentium-related man pages and references
Support for Pentium events was removed completely in e92a1350b5.

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
2021-08-10 17:19:58 -03:00
Michal Meloun aa76f0c397 PMC: remove now orphaned PMC for INTEL XScale processors.
Support for XScale architecture has been deleted in FreeBSD 13.
2020-12-25 15:21:53 +01:00
Warner Losh c81b12e0d7 Revert r336773: it removed too much.
r336773 removed all things xscale. However, some things xscale are
really armv5. Revert that entirely. A more modest removal will follow.

Noticed by: andrew@
2018-07-27 21:25:01 +00:00
Warner Losh 626930c2fd Remove xscale support
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
2018-07-27 18:33:09 +00:00
Enji Cooper 7a40330b95 pmc(3): add additional references for libpmc functions in the SEE ALSO section
These functions are already referenced throughout the manpage -- this makes their
presence more apparent.

MFC after:	2 months
Sponsored by:	Dell EMC Isilon
2017-04-07 05:46:45 +00:00
Ryan Stone f1ec0939ec Add manpage for Haswell Xeon pmc implementation
Differential Revision:	https://reviews.freebsd.org/D1584
Reviewed by:	gnn
MFC After:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:22:43 +00:00
George V. Neville-Neil 56e397023c Update the list of cross references to include the more modern set of
processors that we now support.
2014-07-28 10:17:41 +00:00
Baptiste Daroussin 2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Joel Dahl 9ee2158b55 mdoc: minor Bl improvements. 2012-06-02 08:47:26 +00:00
Fabien Thomas f5f9340b98 Add software PMC support.
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
2012-03-28 20:58:30 +00:00
Joel Dahl 41949a1ed5 Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
Christian Brueffer 026dbd291e Switch the license boilerplates to our standard one.
Advantages:
- Reduces the number of different license versions in the tree
- Eliminates a typo
- Removes some incorrect author attributions due to c/p
- Removes c/p error potential for future pmc manpages

Approved by:	jkoshy, gnn, rpaulo, fabient (copyright holders)
MFC after:	1 week
2012-02-17 11:09:51 +00:00
Fabien Thomas dceed24a7c Add a flush of the current PMC log buffer before displaying the next top.
As the underlying block is 4KB if the PMC throughput is low the measurement
will be reported on the next tick. pmcstat(8) use the modified flush API to
reclaim current buffer before displaying next top.

MFC after:	1 month
2011-10-18 15:25:43 +00:00
Joel Dahl c2025a7660 Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2010-08-16 15:18:30 +00:00
Ulrich Spörlein aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Joseph Koshy dd1259dafb Use a more appropriate choice of words.
Submitted by:	danfe
2009-08-23 14:48:25 +00:00
Joseph Koshy 5dcb8c704e Correct grammar. 2009-08-23 06:19:02 +00:00
Joseph Koshy b53a052da8 Fix a typo.
Reported by:	John McCullough <jmccullo at cs.ucsd.edu>
2009-08-23 05:49:12 +00:00
Joseph Koshy f20a61ffe6 Fix typos.
Reported by:	Harald Servat <redcrash at gmail dot com>
2009-08-23 05:47:33 +00:00
Joseph Koshy 0f7668cbae - Document the rules used to determine when spellings of events
are equivalent.
- Reorder text to make the manual page more coherent.
2008-11-24 08:11:33 +00:00
Joseph Koshy 72cf78b859 - Cross-reference new manual pages.
- Spell new PMC class names correctly.
2008-10-04 12:35:02 +00:00
Joseph Koshy 6455febbea Document changes in behaviour due to sparse CPU numbering support. 2008-09-22 14:31:24 +00:00
Joseph Koshy 624f6965da Keep symbols in sorted order. 2008-09-19 13:21:23 +00:00
Joseph Koshy 0f3866fa5f Improve grammar. 2008-09-18 10:20:35 +00:00
Joseph Koshy 80f30b733b Document new PMC classes, capabilities and CPU kinds.
Improve typography.
2008-09-18 10:16:54 +00:00
Joseph Koshy 24f2c3f394 Replace PMC-dependent content with references to
the appropriate manual pages.
2008-09-16 16:58:24 +00:00
Joseph Koshy bcbe65a85f - Document Pentium and Pentium MMX events.
- Update (c) years and the manual page's date.
2008-03-14 06:22:03 +00:00
Joseph Koshy 120da7bd62 Correct a typo. 2008-02-03 06:04:38 +00:00
Joseph Koshy 0b84422642 Replace a spurious cross-reference to hwpmc(4) with correct text. 2007-12-03 10:59:23 +00:00
Joseph Koshy c89d1cf588 - Add an overview of the pmc(3) API.
- Defer detailed descriptions of individual functions in the API to
  function-specific manual pages.
2007-11-25 06:50:31 +00:00
Joseph Koshy d62f5d4e5c Fix a bug in the description of the "p6-div" event. [1]
Update the description of the "p6-div" and "p6-mul" events according
to the "Intel(r) 64 and IA-32 Architectures Software Developers
Manual Volume 3B: System Programming Guide, Part 2, November 2006".

Reported by: 	Harald Servat <redcrash at gmail dot com> [1]
2007-04-12 09:16:54 +00:00
Joseph Koshy 7aa963e5e5 Clarify memory management rules for pmc_cpuinfo().
Suggested by:	"Harald Servat" <redcrash at gmail dot com>
2007-03-26 17:33:41 +00:00
Joseph Koshy d8acba2a3e Update the pmc(3) manual page's date string and freshen the year in the (c) line for
pmc.3 and libpmc.c.
2006-03-20 15:28:59 +00:00
Joseph Koshy 177a2f2245 Add an alias 'unhalted-cycles' denoting cycles where the CPU is
not in a halt or sleep state.
2006-02-25 05:34:00 +00:00
Ruslan Ermilov 3a14548604 Fix prototypes. 2005-11-24 10:54:47 +00:00
Ruslan Ermilov 110e1704d3 -mdoc sweep. 2005-11-17 13:00:00 +00:00
Joseph Koshy 5138c36a1b Add COMPATIBILITY and HISTORY sections.
MFC after:	3 days
2005-07-21 06:44:54 +00:00
Christian Brueffer f0ea72a038 - Remove MLINKS to nonexistant manpages
- Change some section numbers to match reality
- For MLINKS to manpages from ports, mention which port installs them

MFC after:	3 days
2005-07-14 20:29:08 +00:00
Ruslan Ermilov 9abe909b54 - Tidy up the markup.
- Clarify the sections on "Cascading P4 PMCs" and
  "Precise Event Based Sampling" (1)
- Bump document date.

Reviewed by:	jkoshy
Submitted by:	jkoshy (1)
Approved by:	re (blanket)
2005-06-24 16:56:24 +00:00
Joseph Koshy f263522a45 MFP4:
- Implement sampling modes and logging support in hwpmc(4).

- Separate MI and MD parts of hwpmc(4) and allow sharing of
  PMC implementations across different architectures.
  Add support for P4 (EMT64) style PMCs to the amd64 code.

- New pmcstat(8) options: -E (exit time counts) -W (counts
  every context switch), -R (print log file).

- pmc(3) API changes, improve our ability to keep ABI compatibility
  in the future.  Add more 'alias' names for commonly used events.

- bug fixes & documentation.
2005-06-09 19:45:09 +00:00
Joseph Koshy c5153e190b Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.
Have pmcstat(8) and pmccontrol(8) use these APIs.

Return PMC class-related constants (PMC widths and capabilities)
with the OP GETCPUINFO call leaving OP PMCINFO to return only the
dynamic information associated with a PMC (i.e., whether enabled,
owner pid, reload count etc.).

Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to
get upto-date values from hardware since we can guarantee that the
hardware is running the correct PMC at the time of the call.

Bug fixes:
 - (x86 class processors) Fix a bug that prevented an RDPMC
   instruction from being recognized as permitted till after the
   attached process had context switched out and back in again after
   a pmc_start() call.

   Tighten the rules for using RDPMC class instructions: a GETMSR
   OP is now allowed only after an OP ATTACH has been done by the
   PMC's owner to itself.  OP GETMSR is not allowed for PMCs that
   track descendants, for PMCs attached to processes other than
   their owner processes.

 - (P4/HTT processors only) Fix a bug that caused the MI and MD
   layers to get out of sync.  Add a new MD operation 'get_config()'
   as part of this fix.

 - Allow multiple system-mode PMCs at the same row-index but on
   different CPUs to be allocated.

 - Reject allocation of an administratively disabled PMC.

Misc. code cleanups and refactoring.  Improve a few comments.
2005-05-01 14:11:49 +00:00
Joseph Koshy 67edd22983 Note events affected by processor errata. 2005-04-23 05:45:18 +00:00