cvs commit: src/sys/dev/hwpmc hwpmc_amd.c

Adrian Chadd adrian at FreeBSD.org
Tue Mar 18 01:39:12 PDT 2008


adrian      2008-03-18 08:39:12 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/hwpmc        hwpmc_amd.c 
  Log:
  Sign-extend the 48-bit AMD PMC counter before treating it to a 64-bit
  2's compliment.
  
  The 2's compliment transform is done so a "count down" sampling interval
  can be converted into a "count up" PMC value. a 2's complimented 'count down'
  value is written to the PMC counter; then the read-back counter is reverted
  via another 2's compliment.
  
  PR: kern/121660
  Reviewed by: jkoshy
  Approved by: jkoshy
  MFC after: 1 week
  
  Revision  Changes    Path
  1.16      +8 -5      src/sys/dev/hwpmc/hwpmc_amd.c


More information about the cvs-src mailing list