summaryrefslogtreecommitdiff
path: root/lib/libpmc
Commit message (Collapse)AuthorAgeFilesLines
* MFC {r1.9 libpmc.c, r1.10 pmc.3}: Add an alias 'unhalted-cycles'Joseph Koshy2006-03-192-3/+9
| | | | | | | | | | denoting cycles where the CPU is not in a halt or sleep state. [1] Increment the manual page date, bring the copyright year upto-date. Approved by: re (mux) [1] Notes: svn path=/stable/6/; revision=156864
* MFC r1.7:Joseph Koshy2005-07-301-0/+22
| | | | | | | | | Add COMPATIBILITY and HISTORY sections. Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=148565
* MFC r1.3:Joseph Koshy2005-07-301-6/+27
| | | | | | | | | | Catch with the source code. Sort a list alphabetically. Add a HISTORY section. Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=148564
* MFC:Christian Brueffer2005-07-171-1/+0
| | | | | | | | | | | - Remove MLINKS to nonexistant manpages - Change some section numbers to match reality - For MLINKS to manpages from ports, mention which port installs them Approved by: re (hrs) Notes: svn path=/stable/6/; revision=148098
* Fix a bug in pmclog_read() that causes it to return with a falseJoseph Koshy2005-07-091-2/+15
| | | | | | | | | error when a log record crosses an internal buffer boundary. Approved by: re (scottl) Notes: svn path=/head/; revision=147864
* - Update the CPU version check to recognize P4/EMT64 CPUs. [1]Joseph Koshy2005-07-031-7/+12
| | | | | | | | | | | | - Allow libpmc(3) to support P4/EMT64 PMCs on the amd64 architecture and AMD K8 PMCs on the i386. [2] Submitted by: ps [1] Pointy hat: myself [2] Approved by: re (scottl) Notes: svn path=/head/; revision=147759
* MFP4:Joseph Koshy2005-06-302-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - pmcstat(8) gprof output mode fixes: lib/libpmc/pmclog.{c,h}, sys/sys/pmclog.h: + Add a 'is_usermode' field to the PMCLOG_PCSAMPLE event + Add an 'entryaddr' field to the PMCLOG_PROCEXEC event, so that pmcstat(8) can determine where the runtime loader /libexec/ld-elf.so.1 is getting loaded. sys/kern/kern_exec.c: + Use a local struct to group the entry address of the image being exec()'ed and the process credential changed flag to the exec handling hook inside hwpmc(4). usr.sbin/pmcstat/*: + Support "-k kernelpath", "-D sampledir". + Implement the ELF bits of 'gmon.out' profile generation in a new file "pmcstat_log.c". Move all log related functions to this file. + Move local definitions and prototypes to "pmcstat.h" - Other bug fixes: + lib/libpmc/pmclog.c: correctly handle EOF in pmclog_read(). + sys/dev/hwpmc_mod.c: unconditionally log a PROCEXIT event to all attached PMCs when a process exits. + sys/sys/pmc.h: correct a function prototype. + Improve usage checks in pmcstat(8). Approved by: re (blanket hwpmc) Notes: svn path=/head/; revision=147708
* - Tidy up the markup.Ruslan Ermilov2005-06-241-190/+402
| | | | | | | | | | | | | - 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) Notes: svn path=/head/; revision=147586
* Tidy up the markup.Ruslan Ermilov2005-06-241-12/+17
| | | | | | | | Reviewed by: jkoshy Approved by: re (blanket) Notes: svn path=/head/; revision=147584
* Fix tinderbox breakage.Joseph Koshy2005-06-101-4/+13
| | | | Notes: svn path=/head/; revision=147219
* MFP4:Joseph Koshy2005-06-097-753/+1833
| | | | | | | | | | | | | | | | | | | - 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. Notes: svn path=/head/; revision=147191
* Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.Joseph Koshy2005-05-014-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=145774
* Note events affected by processor errata.Joseph Koshy2005-04-231-0/+25
| | | | Notes: svn path=/head/; revision=145440
* Add event aliases for P6 and K8 PMCs.Joseph Koshy2005-04-211-17/+31
| | | | Notes: svn path=/head/; revision=145351
* o Do not include <machine/pmc_mdep.h>. It's automaticly included forMarcel Moolenaar2005-04-201-9/+9
| | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=145340
* Remove extra Id keyword.Joseph Koshy2005-04-201-2/+0
| | | | Notes: svn path=/head/; revision=145315
* Remove superfluous CFLAGS lines. Use the conditional '?=' constructJoseph Koshy2005-04-191-2/+0
| | | | | | | | | for WARNS lines. Submitted by: ru Notes: svn path=/head/; revision=145280
* Bring a working snapshot of hwpmc(4), its associated libraries, userland ↵Joseph Koshy2005-04-194-0/+5348
utilities and documentation into -CURRENT. Bump FreeBSD_version. Reviewed by: alc, jhb (kernel changes) Notes: svn path=/head/; revision=145256