Commit Graph

9 Commits

Author SHA1 Message Date
Joseph Koshy
1455fcd32d Fix tinderbox breakage. 2005-06-10 03:45:04 +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
Joseph Koshy
d56c5d4bec Add event aliases for P6 and K8 PMCs. 2005-04-21 05:50:25 +00:00
Marcel Moolenaar
04e9feb06c o Do not include <machine/pmc_mdep.h>. It's automaticly included for
us when <sys/pmc.h> is included.
o  Replace "#if __i386__" and "#if __amd64__" with the equivalent of
   "#ifdef __i386__" and "#ifdef __amd64__" (resp.) These tokens are
   not defined on all platforms.
o  Conditionally compile pmc_parse_mask() on i386 and amd64 only. It's
   only referenced there. This will change when support for other
   platforms is added, of course.

Ok'd by: jkoshy@
2005-04-20 20:48:24 +00:00
Joseph Koshy
c570de2caf Remove extra Id keyword. 2005-04-20 05:36:43 +00:00
Joseph Koshy
90f629a16a Remove superfluous CFLAGS lines. Use the conditional '?=' construct
for WARNS lines.

Submitted by:	ru
2005-04-19 14:43:59 +00:00
Joseph Koshy
ebccf1e3a6 Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities
and documentation into -CURRENT.

Bump FreeBSD_version.

Reviewed by:	alc, jhb (kernel changes)
2005-04-19 04:01:25 +00:00