Bug 230984

Summary: pmccontrol can't display event names anymore
Product: Base System Reporter: Mark Johnston <markj>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: cem, emaste, mmacy, olivier, tcovert+freebsd
Priority: --- Keywords: regression
Version: CURRENT   
Hardware: amd64   
OS: Any   
Bug Depends on:    
Bug Blocks: 228911    

Description Mark Johnston freebsd_committer 2018-08-28 19:17:02 UTC
I guess this stopped working when the PMC event definitions moved to libpmc.

markj@biggie> sudo pmccontrol -L
SOFT
        CLOCK.HARD
        CLOCK.STAT
        CLOCK.PROF
        PAGE_FAULT.ALL
        PAGE_FAULT.READ
        PAGE_FAULT.WRITE
        LOCK.FAILED
TSC
        TSC
IAP
pmccontrol: ERROR: Cannot find information for event class "IAP": Invalid argument

I also can't use any of the standard event names with pmcstat anymore:

markj@biggie> sudo pmcstat -P instructions-retired find -x / -name foo
pmcstat: ERROR: pmc_pmu_allocate failed, check for ctrname instructions-retired
Comment 1 Olivier Cochard freebsd_committer 2018-09-22 08:27:21 UTC
Same problem here on 4 different servers, all using FreeBSD 12.0-ALPHA7 r338874.
Their hw.model are:
Intel(R) Xeon(R) CPU L5630 @ 2.13GHz
Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
Comment 2 commit-hook freebsd_committer 2018-09-24 19:07:02 UTC
A commit references this bug:

Author: mmacy
Date: Mon Sep 24 19:06:09 UTC 2018
New revision: 338918
URL: https://svnweb.freebsd.org/changeset/base/338918

Log:
  restore pmccontrol -L behavior on x86

  When I updated counter definition handling for x86 I broke
  'pmccontrol -L' listing counter names. This just changes
  pmccontrol to call the library function on x86.

  PR:	230984
  Approved by:	re (kib@)

Changes:
  head/usr.sbin/pmccontrol/pmccontrol.c