summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_ppro.c
Commit message (Collapse)AuthorAgeFilesLines
* Kernel and hwpmc(4) support for callchain capture.jkoshy2007-12-071-2/+8
| | | | Sponsored by: FreeBSD Foundation and Google Inc.
* Fix breakage introduced in rev 1.7.jkoshy2005-07-141-1/+1
| | | | MFC after: 3 days
* sys/dev/hwpmc/hwpmc_{amd,piv,ppro}.c:jkoshy2005-07-091-2/+3
| | | | | | | | | | | | | | | | | | - Update driver interrupt statistics correctly. sys/sys/pmc.h, sys/dev/hwpmc/hwpmc_mod.c: - Fix a bug affecting debug printfs. - Move the 'stalled' flag from being in a bit in the 'pm_flags' field of a 'struct pmc' to a field of its own in the same structure. This flag is updated from the NMI handler and keeping it separate makes it easier to avoid races with other parts of the code. sys/dev/hwpmc/hwpmc_logging.c: - Do arithmetic with 'uintptr_t' types rather that casting to and from 'char *'. Approved by: re (scottl)
* MFP4:jkoshy2005-06-091-38/+130
| | | | | | | | | | | | | | | | - 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.
* Kernel hooks to support PMC sampling modes.jkoshy2005-05-301-1/+1
| | | | Reviewed by: alc
* Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.jkoshy2005-05-011-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Return the correct register number in the 'get_msr()' MD function.jkoshy2005-04-281-2/+11
| | | | | | | | Only allow a process to use the x86 RDPMC instruction if it has allocated and attached a PMC to itself. Inform the MD layer of the "pseudo context switch out" that needs to be done when the last thread of a process is exiting.
* Include <sys/pmc.h> instead of <machine/pmc_mdep.h>. The MI headermarcel2005-04-201-2/+1
| | | | | | | | includes the MD header for us. Do not include <machine/specialreg.h> as it is not a header file that can be included from MI files. It is included from <machine/pmc_mdep.h> if so needed and possible. Ok'd: jkoshy@
* Bring a working snapshot of hwpmc(4), its associated libraries, userland ↵jkoshy2005-04-191-0/+742
utilities and documentation into -CURRENT. Bump FreeBSD_version. Reviewed by: alc, jhb (kernel changes)
OpenPOWER on IntegriCloud