From owner-cvs-src@FreeBSD.ORG Sun May 1 14:11:49 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 852BE16A4CE; Sun, 1 May 2005 14:11:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 366D943D55; Sun, 1 May 2005 14:11:49 +0000 (GMT) (envelope-from jkoshy@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j41EBn7o053230; Sun, 1 May 2005 14:11:49 GMT (envelope-from jkoshy@repoman.freebsd.org) Received: (from jkoshy@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j41EBn3P053229; Sun, 1 May 2005 14:11:49 GMT (envelope-from jkoshy) Message-Id: <200505011411.j41EBn3P053229@repoman.freebsd.org> From: Joseph Koshy Date: Sun, 1 May 2005 14:11:49 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libpmc Makefile libpmc.c pmc.3 pmc.h src/share/man/man4 hwpmc.4 src/sys/dev/hwpmc hwpmc_amd.c hwpmc_intel.c hwpmc_mod.c hwpmc_piv.c hwpmc_ppro.c src/sys/i386/include pmc_mdep.h src/sys/sys pmc.h ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2005 14:11:49 -0000 jkoshy 2005-05-01 14:11:49 UTC FreeBSD src repository Modified files: lib/libpmc Makefile libpmc.c pmc.3 pmc.h share/man/man4 hwpmc.4 sys/dev/hwpmc hwpmc_amd.c hwpmc_intel.c hwpmc_mod.c hwpmc_piv.c hwpmc_ppro.c sys/i386/include pmc_mdep.h sys/sys pmc.h usr.sbin/pmccontrol pmccontrol.c usr.sbin/pmcstat pmcstat.c Log: 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. Revision Changes Path 1.3 +2 -0 src/lib/libpmc/Makefile 1.5 +30 -0 src/lib/libpmc/libpmc.c 1.3 +23 -1 src/lib/libpmc/pmc.3 1.2 +2 -0 src/lib/libpmc/pmc.h 1.2 +18 -3 src/share/man/man4/hwpmc.4 1.5 +31 -11 src/sys/dev/hwpmc/hwpmc_amd.c 1.4 +3 -1 src/sys/dev/hwpmc/hwpmc_intel.c 1.7 +258 -140 src/sys/dev/hwpmc/hwpmc_mod.c 1.6 +305 -138 src/sys/dev/hwpmc/hwpmc_piv.c 1.5 +31 -9 src/sys/dev/hwpmc/hwpmc_ppro.c 1.4 +3 -0 src/sys/i386/include/pmc_mdep.h 1.4 +81 -37 src/sys/sys/pmc.h 1.2 +1 -1 src/usr.sbin/pmccontrol/pmccontrol.c 1.2 +12 -12 src/usr.sbin/pmcstat/pmcstat.c