summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libpmc/Makefile24
-rw-r--r--lib/libpmc/libpmc.c30
-rw-r--r--lib/libpmc/libpmc_pmu_util.c333
-rw-r--r--lib/libpmc/pmc.h8
-rw-r--r--lib/libpmc/pmclog.37
-rw-r--r--lib/libpmc/pmclog.c32
-rw-r--r--lib/libpmc/pmclog.h1
-rw-r--r--lib/libpmc/pmu-events/Makefile (renamed from lib/libpmcstat/pmu-events/Makefile)0
-rw-r--r--lib/libpmc/pmu-events/README (renamed from lib/libpmcstat/pmu-events/README)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json (renamed from lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/arm64/mapfile.csv (renamed from lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/mapfile.csv (renamed from lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/cache.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/marked.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/memory.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/other.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power8/translation.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/cache.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/marked.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/memory.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/other.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/powerpc/power9/translation.json (renamed from lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json (renamed from lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/s390/mapfile.csv (renamed from lib/libpmcstat/pmu-events/arch/s390/mapfile.csv)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/uncore.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/mapfile.csv (renamed from lib/libpmcstat/pmu-events/arch/x86/mapfile.csv)5
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/silvermont/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/silvermont/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/uncore.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/cache.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/other.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json)0
-rw-r--r--lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json (renamed from lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json)0
-rw-r--r--lib/libpmc/pmu-events/jevents.c (renamed from lib/libpmcstat/pmu-events/jevents.c)0
-rw-r--r--lib/libpmc/pmu-events/jevents.h (renamed from lib/libpmcstat/pmu-events/jevents.h)0
-rw-r--r--lib/libpmc/pmu-events/jsmn.c (renamed from lib/libpmcstat/pmu-events/jsmn.c)0
-rw-r--r--lib/libpmc/pmu-events/jsmn.h (renamed from lib/libpmcstat/pmu-events/jsmn.h)0
-rw-r--r--lib/libpmc/pmu-events/json.c (renamed from lib/libpmcstat/pmu-events/json.c)0
-rw-r--r--lib/libpmc/pmu-events/json.h (renamed from lib/libpmcstat/pmu-events/json.h)0
-rw-r--r--lib/libpmc/pmu-events/list.h (renamed from lib/libpmcstat/pmu-events/list.h)0
-rw-r--r--lib/libpmc/pmu-events/pmu-events.h (renamed from lib/libpmcstat/pmu-events/pmu-events.h)0
-rw-r--r--lib/libpmcstat/Makefile25
-rw-r--r--lib/libpmcstat/libpmcstat.h2
-rw-r--r--lib/libpmcstat/libpmcstat_logging.c43
-rw-r--r--lib/libpmcstat/libpmcstat_pmu_util.c164
246 files changed, 414 insertions, 260 deletions
diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile
index 30510f6144b0..6eb2ad6863d2 100644
--- a/lib/libpmc/Makefile
+++ b/lib/libpmc/Makefile
@@ -3,9 +3,31 @@
PACKAGE=lib${LIB}
LIB= pmc
-SRCS= libpmc.c pmclog.c
+SRCS= libpmc.c pmclog.c libpmc_pmu_util.c
INCS= pmc.h pmclog.h
+CFLAGS+= -I${.CURDIR}
+
+.if ${MACHINE_CPUARCH} == "amd64"
+
+.if ${MACHINE_CPUARCH} == "aarch64"
+EVENT_ARCH="arm64"
+.elif ${MACHINE_CPUARCH} == "amd64"
+EVENT_ARCH="x86"
+.elif ${MACHINE_CPUARCH} == "powerpc"
+EVENT_ARCH="powerpc"
+.endif
+
+JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents
+# This file is built in a subdirectory so never try to rebuild
+# it here due to missing meta file.
+${JEVENTS}: .NOMETA
+
+libpmc_events.c: ${JEVENTS}
+ ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c
+SRCS+= libpmc_events.c
+.endif
+
MAN= pmc.3
MAN+= pmc_allocate.3
MAN+= pmc_attach.3
diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c
index 8b25768d33d1..05fd84bc0b90 100644
--- a/lib/libpmc/libpmc.c
+++ b/lib/libpmc/libpmc.c
@@ -2781,8 +2781,27 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode,
if (mode != PMC_MODE_SS && mode != PMC_MODE_TS &&
mode != PMC_MODE_SC && mode != PMC_MODE_TC) {
- errno = EINVAL;
- goto out;
+ return (EINVAL);
+ }
+ bzero(&pmc_config, sizeof(pmc_config));
+ pmc_config.pm_cpu = cpu;
+ pmc_config.pm_mode = mode;
+ pmc_config.pm_flags = flags;
+ if (PMC_IS_SAMPLING_MODE(mode))
+ pmc_config.pm_caps |= PMC_CAP_INTERRUPT;
+ /*
+ * Can we pull this straight from the pmu table?
+ */
+ r = spec_copy = strdup(ctrspec);
+ ctrname = strsep(&r, ",");
+ if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) {
+ if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0)
+ return (errno);
+ *pmcid = pmc_config.pm_pmcid;
+ return (0);
+ } else {
+ free(spec_copy);
+ spec_copy = NULL;
}
/* replace an event alias with the canonical event specifier */
@@ -2833,15 +2852,8 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode,
goto out;
}
- bzero(&pmc_config, sizeof(pmc_config));
pmc_config.pm_ev = ev->pm_ev_code;
pmc_config.pm_class = pcd->pm_evc_class;
- pmc_config.pm_cpu = cpu;
- pmc_config.pm_mode = mode;
- pmc_config.pm_flags = flags;
-
- if (PMC_IS_SAMPLING_MODE(mode))
- pmc_config.pm_caps |= PMC_CAP_INTERRUPT;
if (pcd->pm_evc_allocate_pmc(ev->pm_ev_code, r, &pmc_config) < 0) {
errno = EINVAL;
diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c
new file mode 100644
index 000000000000..c2ac3b9e931a
--- /dev/null
+++ b/lib/libpmc/libpmc_pmu_util.c
@@ -0,0 +1,333 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2018, Matthew Macy
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/errno.h>
+#include <sys/sysctl.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <pmc.h>
+#include <pmclog.h>
+#include <libpmcstat.h>
+#include "pmu-events/pmu-events.h"
+
+#if defined(__amd64__)
+struct pmu_alias {
+ const char *pa_alias;
+ const char *pa_name;
+};
+static struct pmu_alias pmu_alias_table[] = {
+ { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
+ { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
+ { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"},
+ { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"},
+ { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"},
+ { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"},
+ { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"},
+ { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"},
+ { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"},
+ { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"},
+ { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"},
+ { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"},
+ { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
+ { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
+ { NULL, NULL },
+};
+
+static const char *
+pmu_alias_get(const char *name)
+{
+ struct pmu_alias *pa;
+
+ for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++)
+ if (strcasecmp(name, pa->pa_alias) == 0)
+ return (pa->pa_name);
+ return (name);
+}
+
+struct pmu_event_desc {
+ uint64_t ped_period;
+ uint64_t ped_offcore_rsp;
+ uint32_t ped_event;
+ uint32_t ped_frontend;
+ uint32_t ped_ldlat;
+ uint32_t ped_config1;
+ uint8_t ped_umask;
+ uint8_t ped_cmask;
+ uint8_t ped_any;
+ uint8_t ped_inv;
+ uint8_t ped_edge;
+ uint8_t ped_fc_mask;
+ uint8_t ped_ch_mask;
+};
+
+static const struct pmu_events_map *
+pmu_events_map_get(void)
+{
+ size_t s;
+ char buf[64];
+ const struct pmu_events_map *pme;
+
+ if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s,
+ (void *)NULL, 0) == -1)
+ return (NULL);
+ if (sysctlbyname("kern.hwpmc.cpuid", buf, &s,
+ (void *)NULL, 0) == -1)
+ return (NULL);
+ for (pme = pmu_events_map; pme->cpuid != NULL; pme++)
+ if (strcmp(buf, pme->cpuid) == 0)
+ return (pme);
+ return (NULL);
+}
+
+static const struct pmu_event *
+pmu_event_get(const char *event_name, int *idx)
+{
+ const struct pmu_events_map *pme;
+ const struct pmu_event *pe;
+ int i;
+
+ if ((pme = pmu_events_map_get()) == NULL)
+ return (NULL);
+ for (i = 0, pe = pme->table; pe->name || pe->desc || pe->event; pe++, i++) {
+ if (pe->name == NULL)
+ continue;
+ if (strcasecmp(pe->name, event_name) == 0) {
+ if (idx)
+ *idx = i;
+ return (pe);
+ }
+ }
+ return (NULL);
+}
+
+const char *
+pmu_event_get_by_idx(int idx)
+{
+ const struct pmu_events_map *pme;
+ const struct pmu_event *pe;
+ int i;
+
+ if ((pme = pmu_events_map_get()) == NULL)
+ return (NULL);
+ for (i = 0, pe = pme->table; (pe->name || pe->desc || pe->event) && i < idx; pe++, i++)
+ ;
+ return (pe->name);
+}
+
+static int
+pmu_parse_event(struct pmu_event_desc *ped, const char *eventin)
+{
+ char *event;
+ char *kvp, *key, *value;
+ char *debug;
+
+ if ((event = strdup(eventin)) == NULL)
+ return (ENOMEM);
+ bzero(ped, sizeof(*ped));
+ while ((kvp = strsep(&event, ",")) != NULL) {
+ key = strsep(&kvp, "=");
+ if (key == NULL)
+ abort();
+ value = kvp;
+ if (strcmp(key, "umask") == 0)
+ ped->ped_umask = strtol(value, NULL, 16);
+ else if (strcmp(key, "event") == 0)
+ ped->ped_event = strtol(value, NULL, 16);
+ else if (strcmp(key, "period") == 0)
+ ped->ped_period = strtol(value, NULL, 10);
+ else if (strcmp(key, "offcore_rsp") == 0)
+ ped->ped_offcore_rsp = strtol(value, NULL, 16);
+ else if (strcmp(key, "any") == 0)
+ ped->ped_any = strtol(value, NULL, 10);
+ else if (strcmp(key, "cmask") == 0)
+ ped->ped_cmask = strtol(value, NULL, 10);
+ else if (strcmp(key, "inv") == 0)
+ ped->ped_inv = strtol(value, NULL, 10);
+ else if (strcmp(key, "edge") == 0)
+ ped->ped_edge = strtol(value, NULL, 10);
+ else if (strcmp(key, "frontend") == 0)
+ ped->ped_frontend = strtol(value, NULL, 16);
+ else if (strcmp(key, "ldlat") == 0)
+ ped->ped_ldlat = strtol(value, NULL, 16);
+ else if (strcmp(key, "fc_mask") == 0)
+ ped->ped_fc_mask = strtol(value, NULL, 16);
+ else if (strcmp(key, "ch_mask") == 0)
+ ped->ped_ch_mask = strtol(value, NULL, 16);
+ else if (strcmp(key, "config1") == 0)
+ ped->ped_config1 = strtol(value, NULL, 16);
+ else {
+ debug = getenv("PMUDEBUG");
+ if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL)
+ printf("unrecognized kvpair: %s:%s\n", key, value);
+ }
+ }
+ free(event);
+ return (0);
+}
+
+uint64_t
+pmc_pmu_sample_rate_get(const char *event_name)
+{
+ const struct pmu_event *pe;
+ struct pmu_event_desc ped;
+
+ event_name = pmu_alias_get(event_name);
+ if ((pe = pmu_event_get(event_name, NULL)) == NULL)
+ return (DEFAULT_SAMPLE_COUNT);
+ if (pe->alias && (pe = pmu_event_get(pe->alias, NULL)) == NULL)
+ return (DEFAULT_SAMPLE_COUNT);
+ if (pe->event == NULL)
+ return (DEFAULT_SAMPLE_COUNT);
+ if (pmu_parse_event(&ped, pe->event))
+ return (DEFAULT_SAMPLE_COUNT);
+ return (ped.ped_period);
+}
+
+int
+pmc_pmu_enabled(void)
+{
+
+ return (pmu_events_map_get() != NULL);
+}
+
+void
+pmc_pmu_print_counters(void)
+{
+ const struct pmu_events_map *pme;
+ const struct pmu_event *pe;
+ struct pmu_event_desc ped;
+ char *debug;
+ int do_debug;
+
+ debug = getenv("PMUDEBUG");
+ do_debug = 0;
+
+ if (debug != NULL && strcmp(debug, "true") == 0)
+ do_debug = 1;
+ if ((pme = pmu_events_map_get()) == NULL)
+ return;
+ for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) {
+ if (pe->name == NULL)
+ continue;
+ printf("\t%s\n", pe->name);
+ if (do_debug)
+ pmu_parse_event(&ped, pe->event);
+ }
+}
+
+void
+pmc_pmu_print_counter_desc(const char *ev)
+{
+ const struct pmu_events_map *pme;
+ const struct pmu_event *pe;
+
+ if ((pme = pmu_events_map_get()) == NULL)
+ return;
+ for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) {
+ if (pe->name == NULL)
+ continue;
+ if (strcasestr(pe->name, ev) != NULL &&
+ pe->desc != NULL)
+ printf("%s:\t%s\n", pe->name, pe->desc);
+ }
+}
+
+void
+pmc_pmu_print_counter_desc_long(const char *ev)
+{
+ const struct pmu_events_map *pme;
+ const struct pmu_event *pe;
+
+ if ((pme = pmu_events_map_get()) == NULL)
+ return;
+ for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) {
+ if (pe->name == NULL)
+ continue;
+ if (strcasestr(pe->name, ev) != NULL) {
+ if (pe->long_desc != NULL)
+ printf("%s:\n%s\n", pe->name, pe->long_desc);
+ else if (pe->desc != NULL)
+ printf("%s:\t%s\n", pe->name, pe->desc);
+ }
+ }
+}
+
+int
+pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm)
+{
+ const struct pmu_event *pe;
+ struct pmu_event_desc ped;
+ struct pmc_md_iap_op_pmcallocate *iap;
+ int idx;
+
+ iap = &pm->pm_md.pm_iap;
+ bzero(iap, sizeof(*iap));
+ event_name = pmu_alias_get(event_name);
+ if ((pe = pmu_event_get(event_name, &idx)) == NULL)
+ return (ENOENT);
+ if (pe->alias && (pe = pmu_event_get(pe->alias, &idx)) == NULL)
+ return (ENOENT);
+ if (pe->event == NULL)
+ return (ENOENT);
+ if (pmu_parse_event(&ped, pe->event))
+ return (ENOENT);
+
+ pm->pm_class = PMC_CLASS_IAP;
+ pm->pm_ev = idx;
+ iap->pm_iap_config |= IAP_EVSEL(ped.ped_event);
+ iap->pm_iap_config |= IAP_UMASK(ped.ped_umask);
+ iap->pm_iap_config |= IAP_CMASK(ped.ped_cmask);
+ iap->pm_iap_rsp = ped.ped_offcore_rsp;
+
+ iap->pm_iap_config |= (IAP_USR | IAP_OS);
+ if (ped.ped_edge)
+ iap->pm_iap_config |= IAP_EDGE;
+ if (ped.ped_any)
+ iap->pm_iap_config |= IAP_ANY;
+ if (ped.ped_inv)
+ iap->pm_iap_config |= IAP_EDGE;
+ if (pm->pm_caps & PMC_CAP_INTERRUPT)
+ iap->pm_iap_config |= IAP_INT;
+ return (0);
+}
+
+#else
+uint64_t pmc_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); }
+void pmc_pmu_print_counters(void) {}
+void pmc_pmu_print_counter_desc(const char *e __unused) {}
+void pmc_pmu_print_counter_desc_long(const char *e __unused) {}
+int pmc_pmu_enabled(void) { return (0); }
+int pmc_pmu_pmcallocate(const char *e __unused, struct pmc_op_pmcallocate *p __unused) { return (EOPNOTSUPP); }
+const char *pmu_event_get_by_idx(int idx __unused) { return (NULL); }
+
+#endif
diff --git a/lib/libpmc/pmc.h b/lib/libpmc/pmc.h
index 5e4b89e4ea05..3a72930b9e1d 100644
--- a/lib/libpmc/pmc.h
+++ b/lib/libpmc/pmc.h
@@ -112,6 +112,14 @@ const char *pmc_name_of_state(enum pmc_state _ps);
int pmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames,
int *_nevents);
+
+int pmc_pmu_enabled(void);
+void pmc_pmu_print_counters(void);
+void pmc_pmu_print_counter_desc(const char *);
+void pmc_pmu_print_counter_desc_long(const char *);
+uint64_t pmc_pmu_sample_rate_get(const char *);
+int pmc_pmu_pmcallocate(const char *, struct pmc_op_pmcallocate *);
+const char *pmu_event_get_by_idx(int idx);
__END_DECLS
#endif
diff --git a/lib/libpmc/pmclog.3 b/lib/libpmc/pmclog.3
index 91c7222da7f2..d60e97085831 100644
--- a/lib/libpmc/pmclog.3
+++ b/lib/libpmc/pmclog.3
@@ -82,13 +82,14 @@ struct pmclog_ev {
struct timespec pl_ts; /* log entry timestamp */
enum pmclog_type pl_type; /* log entry kind */
union { /* log entry data */
+ struct pmclog_ev_callchain pl_cc;
struct pmclog_ev_closelog pl_cl;
struct pmclog_ev_dropnotify pl_d;
struct pmclog_ev_initialize pl_i;
struct pmclog_ev_map_in pl_mi;
struct pmclog_ev_map_out pl_mo;
- struct pmclog_ev_pcsample pl_s;
struct pmclog_ev_pmcallocate pl_a;
+ struct pmclog_ev_pmcallocatedyn pl_ad;
struct pmclog_ev_pmcattach pl_t;
struct pmclog_ev_pmcdetach pl_d;
struct pmclog_ev_proccsw pl_c;
@@ -270,8 +271,8 @@ while (pmclog_read(parser, &ev) == 0) {
case PMCLOG_TYPE_PROCCSW:
--process a thread context switch record--
break;
- case PMCLOG_TYPE_PCSAMPLE:
- --process a PC sample--
+ case PMCLOG_TYPE_CALLCHAIN:
+ --process a callchain sample--
break;
--and so on--
}
diff --git a/lib/libpmc/pmclog.c b/lib/libpmc/pmclog.c
index dd91a68d864f..8e0504b290f2 100644
--- a/lib/libpmc/pmclog.c
+++ b/lib/libpmc/pmclog.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <strings.h>
#include <unistd.h>
+#include <stdio.h>
#include <machine/pmc_mdep.h>
@@ -278,7 +279,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len,
struct pmclog_ev *ev)
{
int evlen, pathlen;
- uint32_t h, *le, npc;
+ uint32_t h, *le, npc, noop;
enum pmclog_parser_state e;
struct pmclog_parse_state *ps;
@@ -288,6 +289,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len,
if ((e = pmclog_get_record(ps,data,len)) == PL_STATE_ERROR) {
ev->pl_state = PMCLOG_ERROR;
+ printf("state error\n");
return -1;
}
@@ -301,6 +303,7 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len,
PMCLOG_READ32(le,h);
if (!PMCLOG_HEADER_CHECK_MAGIC(h)) {
+ printf("bad magic\n");
ps->ps_state = PL_STATE_ERROR;
ev->pl_state = PMCLOG_ERROR;
return -1;
@@ -360,21 +363,20 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len,
PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_start);
PMCLOG_READADDR(le,ev->pl_u.pl_mo.pl_end);
break;
- case PMCLOG_TYPE_PCSAMPLE:
- PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pid);
- PMCLOG_READADDR(le,ev->pl_u.pl_s.pl_pc);
- PMCLOG_READ32(le,ev->pl_u.pl_s.pl_pmcid);
- PMCLOG_READ32(le,ev->pl_u.pl_s.pl_usermode);
- PMCLOG_READ32(le,ev->pl_u.pl_s.pl_tid);
- break;
case PMCLOG_TYPE_PMCALLOCATE:
PMCLOG_READ32(le,ev->pl_u.pl_a.pl_pmcid);
PMCLOG_READ32(le,ev->pl_u.pl_a.pl_event);
PMCLOG_READ32(le,ev->pl_u.pl_a.pl_flags);
- if ((ev->pl_u.pl_a.pl_evname =
+ PMCLOG_READ32(le,noop);
+ ev->pl_u.pl_a.pl_evname = pmu_event_get_by_idx(ev->pl_u.pl_a.pl_event);
+ if (ev->pl_u.pl_a.pl_evname != NULL)
+ break;
+ else if ((ev->pl_u.pl_a.pl_evname =
_pmc_name_of_event(ev->pl_u.pl_a.pl_event, ps->ps_arch))
- == NULL)
+ == NULL) {
+ printf("unknown event\n");
goto error;
+ }
break;
case PMCLOG_TYPE_PMCALLOCATEDYN:
PMCLOG_READ32(le,ev->pl_u.pl_ad.pl_pmcid);
@@ -401,14 +403,16 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len,
case PMCLOG_TYPE_PROCEXEC:
PMCLOG_GET_PATHLEN(pathlen,evlen,pmclog_procexec);
PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pid);
- PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr);
PMCLOG_READ32(le,ev->pl_u.pl_x.pl_pmcid);
+ PMCLOG_READ32(le,noop);
+ PMCLOG_READADDR(le,ev->pl_u.pl_x.pl_entryaddr);
PMCLOG_READSTRING(le,ev->pl_u.pl_x.pl_pathname,pathlen);
break;
case PMCLOG_TYPE_PROCEXIT:
PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pmcid);
- PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value);
PMCLOG_READ32(le,ev->pl_u.pl_e.pl_pid);
+ PMCLOG_READ32(le,noop);
+ PMCLOG_READ64(le,ev->pl_u.pl_e.pl_value);
break;
case PMCLOG_TYPE_PROCFORK:
PMCLOG_READ32(le,ev->pl_u.pl_f.pl_oldpid);
@@ -489,8 +493,9 @@ pmclog_read(void *cookie, struct pmclog_ev *ev)
ps->ps_len = nread;
ps->ps_data = ps->ps_buffer;
- } else
+ } else {
return -1;
+ }
}
assert(ps->ps_len > 0);
@@ -498,7 +503,6 @@ pmclog_read(void *cookie, struct pmclog_ev *ev)
/* Retrieve one event from the byte stream. */
retval = pmclog_get_event(ps, &ps->ps_data, &ps->ps_len, ev);
-
/*
* If we need more data and we have a configured fd, try read
* from it.
diff --git a/lib/libpmc/pmclog.h b/lib/libpmc/pmclog.h
index 9f748b77d69a..a6b4d84a1104 100644
--- a/lib/libpmc/pmclog.h
+++ b/lib/libpmc/pmclog.h
@@ -158,7 +158,6 @@ struct pmclog_ev {
struct pmclog_ev_initialize pl_i;
struct pmclog_ev_map_in pl_mi;
struct pmclog_ev_map_out pl_mo;
- struct pmclog_ev_pcsample pl_s;
struct pmclog_ev_pmcallocate pl_a;
struct pmclog_ev_pmcallocatedyn pl_ad;
struct pmclog_ev_pmcattach pl_t;
diff --git a/lib/libpmcstat/pmu-events/Makefile b/lib/libpmc/pmu-events/Makefile
index 65582dba96c2..65582dba96c2 100644
--- a/lib/libpmcstat/pmu-events/Makefile
+++ b/lib/libpmc/pmu-events/Makefile
diff --git a/lib/libpmcstat/pmu-events/README b/lib/libpmc/pmu-events/README
index e62b09b6a844..e62b09b6a844 100644
--- a/lib/libpmcstat/pmu-events/README
+++ b/lib/libpmc/pmu-events/README
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json
index 0b0e6b26605b..0b0e6b26605b 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/branch.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/branch.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json
index ce33b2553277..ce33b2553277 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/bus.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/bus.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json
index 5dfbec43c9f9..5dfbec43c9f9 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/cache.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json
index 25ae642ba381..25ae642ba381 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/memory.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json
index 6cc6cbd7bf0b..6cc6cbd7bf0b 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/other.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json
index f45a6b5d0025..f45a6b5d0025 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/arm64/arm/cortex-a53/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json b/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json
index 6328828c018c..6328828c018c 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/armv8-recommended.json
+++ b/lib/libpmc/pmu-events/arch/arm64/armv8-recommended.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json b/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json
index bc03c06c3918..bc03c06c3918 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json
+++ b/lib/libpmc/pmu-events/arch/arm64/cavium/thunderx2/core-imp-def.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json b/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json
index 9f0f15d15f75..9f0f15d15f75 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json
+++ b/lib/libpmc/pmu-events/arch/arm64/hisilicon/hip08/core-imp-def.json
diff --git a/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv b/lib/libpmc/pmu-events/arch/arm64/mapfile.csv
index f03e26ecb658..f03e26ecb658 100644
--- a/lib/libpmcstat/pmu-events/arch/arm64/mapfile.csv
+++ b/lib/libpmc/pmu-events/arch/arm64/mapfile.csv
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv b/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv
index 229150e7ab7d..229150e7ab7d 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/mapfile.csv
+++ b/lib/libpmc/pmu-events/arch/powerpc/mapfile.csv
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json b/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json
index 4a3daa6b4b96..4a3daa6b4b96 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/cache.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json b/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json
index 5f1bb9fca40c..5f1bb9fca40c 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json b/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json
index 04c5f1b7bee1..04c5f1b7bee1 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/frontend.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json b/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json
index dcdcede3c3fe..dcdcede3c3fe 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/marked.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/marked.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json b/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json
index 87cdaadba7bd..87cdaadba7bd 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/memory.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json b/lib/libpmc/pmu-events/arch/powerpc/power8/other.json
index 704302c3e67d..704302c3e67d 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/other.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json b/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json
index 293f3a4c6901..293f3a4c6901 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json b/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json
index 583e4d937621..583e4d937621 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/pmc.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/pmc.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json b/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json
index e47a55459bc8..e47a55459bc8 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power8/translation.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power8/translation.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json b/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json
index 851072105054..851072105054 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/cache.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json b/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json
index 8a83bca26552..8a83bca26552 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json b/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json
index f9fa84b16fb5..f9fa84b16fb5 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/frontend.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json b/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json
index b1954c38bab1..b1954c38bab1 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/marked.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/marked.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json b/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json
index 2e2ebc700c74..2e2ebc700c74 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/memory.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json b/lib/libpmc/pmu-events/arch/powerpc/power9/other.json
index 48cf4f920b3f..48cf4f920b3f 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/other.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json b/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json
index b4772f54a271..b4772f54a271 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json b/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json
index 8b3b0f3be664..8b3b0f3be664 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/pmc.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/pmc.json
diff --git a/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json b/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json
index b27642676244..b27642676244 100644
--- a/lib/libpmcstat/pmu-events/arch/powerpc/power9/translation.json
+++ b/lib/libpmc/pmu-events/arch/powerpc/power9/translation.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json b/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json
index 8bf16759ca53..8bf16759ca53 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/basic.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z10/basic.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json b/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json
index 7e5b72492141..7e5b72492141 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/crypto.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z10/crypto.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json b/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json
index 0feedb40f30f..0feedb40f30f 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z10/extended.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z10/extended.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json b/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json
index 8bf16759ca53..8bf16759ca53 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/basic.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z13/basic.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json b/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json
index 7e5b72492141..7e5b72492141 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/crypto.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z13/crypto.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json b/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json
index 9a002b6967f1..9a002b6967f1 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z13/extended.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z13/extended.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json b/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json
index 8f653c9d899d..8f653c9d899d 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/basic.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z14/basic.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json b/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json
index 7e5b72492141..7e5b72492141 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/crypto.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z14/crypto.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json b/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json
index aa4dfb46b65b..aa4dfb46b65b 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z14/extended.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z14/extended.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json b/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json
index 8bf16759ca53..8bf16759ca53 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/basic.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z196/basic.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json b/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json
index 7e5b72492141..7e5b72492141 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/crypto.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z196/crypto.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json b/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json
index b6d7fec7c2e7..b6d7fec7c2e7 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_z196/extended.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_z196/extended.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json b/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json
index 8bf16759ca53..8bf16759ca53 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/basic.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_zec12/basic.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json b/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json
index 7e5b72492141..7e5b72492141 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/crypto.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_zec12/crypto.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json b/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json
index 8682126aabb2..8682126aabb2 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/cf_zec12/extended.json
+++ b/lib/libpmc/pmu-events/arch/s390/cf_zec12/extended.json
diff --git a/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv b/lib/libpmc/pmu-events/arch/s390/mapfile.csv
index ca7682748a4b..ca7682748a4b 100644
--- a/lib/libpmcstat/pmu-events/arch/s390/mapfile.csv
+++ b/lib/libpmc/pmu-events/arch/s390/mapfile.csv
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json b/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json
index ffab90c5891c..ffab90c5891c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json b/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json
index f0e090cdb9f0..f0e090cdb9f0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json b/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json
index 935b7dcf067d..935b7dcf067d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json b/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json
index 3ae843b20c8a..3ae843b20c8a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json b/lib/libpmc/pmu-events/arch/x86/bonnell/other.json
index 4bc1c582d1cd..4bc1c582d1cd 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json b/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json
index b2e681c78466..b2e681c78466 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json
index 7bb817588721..7bb817588721 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/bonnell/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/bonnell/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json b/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json
index 00bfdb5c5acb..00bfdb5c5acb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/bdw-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json b/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json
index bba3152ec54a..bba3152ec54a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json b/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json
index 689d478dae93..689d478dae93 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json b/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json
index 7142c76d7f11..7142c76d7f11 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json b/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json
index c9154cebbdf0..c9154cebbdf0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json b/lib/libpmc/pmu-events/arch/x86/broadwell/other.json
index 4f829c5febbe..4f829c5febbe 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json b/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json
index 97c5d0784c6c..97c5d0784c6c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json b/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json
index 28e1e159a3cb..28e1e159a3cb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/uncore.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/uncore.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json
index 2a015e4c7e21..2a015e4c7e21 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwell/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwell/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
index 49c5f123d811..49c5f123d811 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json
index bf243fe2a0ec..bf243fe2a0ec 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json
index d7b9d9c9c518..d7b9d9c9c518 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json
index 72781e1e3362..72781e1e3362 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json
index e44f73c24ac8..e44f73c24ac8 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json
index 4475249ea9da..4475249ea9da 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json
index 920c89da9111..920c89da9111 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json
index 58ed6d33d1f4..58ed6d33d1f4 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json
index f4b0745cdbbf..f4b0745cdbbf 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json
index dd1b95655d1d..dd1b95655d1d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/uncore-power.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/uncore-power.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json
index 7d79c707c6d1..7d79c707c6d1 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellde/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellde/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json
index 5a7f1ec24200..5a7f1ec24200 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/bdx-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json
index bf0c51272068..bf0c51272068 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json
index d7b9d9c9c518..d7b9d9c9c518 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json
index 72781e1e3362..72781e1e3362 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json
index d79a5cfea44b..d79a5cfea44b 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json
index 4475249ea9da..4475249ea9da 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json
index 920c89da9111..920c89da9111 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json
index 58ed6d33d1f4..58ed6d33d1f4 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json
index 824961318c1e..824961318c1e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-interconnect.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-interconnect.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json
index 66eed399724c..66eed399724c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json
index dd1b95655d1d..dd1b95655d1d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/uncore-power.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/uncore-power.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json
index 7d79c707c6d1..7d79c707c6d1 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/broadwellx/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/broadwellx/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json b/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json
index f8bbe087b0f8..f8bbe087b0f8 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json b/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json
index 9ba08518649e..9ba08518649e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json b/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json
index 690cebd12a94..690cebd12a94 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json b/lib/libpmc/pmu-events/arch/x86/goldmont/other.json
index 959cadd7cb0e..959cadd7cb0e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json b/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json
index 254788af8ab6..254788af8ab6 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json
index 9805198d3f5f..9805198d3f5f 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmont/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json
index b4791b443a66..b4791b443a66 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json
index a7878965ceab..a7878965ceab 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json
index 91e0815f3ffb..91e0815f3ffb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json
index b860374418ab..b860374418ab 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json
index ccf1aed69197..ccf1aed69197 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json
index 0b53a3b0dfb8..0b53a3b0dfb8 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/goldmontplus/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json b/lib/libpmc/pmu-events/arch/x86/haswell/cache.json
index da4d6ddd4f92..da4d6ddd4f92 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json b/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json
index f9843e5a9b42..f9843e5a9b42 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json b/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json
index c0a5bedcc15c..c0a5bedcc15c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json b/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json
index 5ab5c78fe580..5ab5c78fe580 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/hsw-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json b/lib/libpmc/pmu-events/arch/x86/haswell/memory.json
index e5f9fa6655b3..e5f9fa6655b3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json b/lib/libpmc/pmu-events/arch/x86/haswell/other.json
index 8a4d898d76c1..8a4d898d76c1 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json b/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json
index a4dcfce4a512..a4dcfce4a512 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json b/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json
index 3ef5c21fef56..3ef5c21fef56 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/uncore.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/uncore.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json
index 777b500a5c9f..777b500a5c9f 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswell/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswell/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json b/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json
index b2fbd617306a..b2fbd617306a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json b/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json
index bc08cc1f2f7e..bc08cc1f2f7e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json b/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json
index a4d9f1fcf940..a4d9f1fcf940 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json b/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json
index 5ab5c78fe580..5ab5c78fe580 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/hsx-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json b/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json
index 56b0f24b8029..56b0f24b8029 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json b/lib/libpmc/pmu-events/arch/x86/haswellx/other.json
index 800e65df31bc..800e65df31bc 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json b/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json
index 8a18bfe9e3e4..8a18bfe9e3e4 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json
index 58ed6d33d1f4..58ed6d33d1f4 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json
index 824961318c1e..824961318c1e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-interconnect.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-interconnect.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json
index 66eed399724c..66eed399724c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json
index dd1b95655d1d..dd1b95655d1d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/uncore-power.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/uncore-power.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json
index 168df552b1a8..168df552b1a8 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/haswellx/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/haswellx/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json
index 999a01bc6467..999a01bc6467 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json
index 950b62c0908e..950b62c0908e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json
index efaa949ead31..efaa949ead31 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json
index 7c2679514efb..7c2679514efb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/ivb-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json
index a74d54f56192..a74d54f56192 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json
index 4eb83ee40412..4eb83ee40412 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json
index 0afbfd95ea30..0afbfd95ea30 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json
index 42c70eed05a2..42c70eed05a2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/uncore.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/uncore.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json
index f243551b4d12..f243551b4d12 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivybridge/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivybridge/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json b/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json
index 6dad3ad6b102..6dad3ad6b102 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json b/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json
index 950b62c0908e..950b62c0908e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json b/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json
index efaa949ead31..efaa949ead31 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json b/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json
index 7c2679514efb..7c2679514efb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/ivt-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json b/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json
index 3a7b86af8816..3a7b86af8816 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json b/lib/libpmc/pmu-events/arch/x86/ivytown/other.json
index 4eb83ee40412..4eb83ee40412 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json b/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json
index 0afbfd95ea30..0afbfd95ea30 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json
index 267410594833..267410594833 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json
index b798a860bc81..b798a860bc81 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-interconnect.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-interconnect.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json
index df4b43294fa0..df4b43294fa0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json
index d40498f2cb1e..d40498f2cb1e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/uncore-power.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json
index 4645e9d3f460..4645e9d3f460 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/ivytown/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/ivytown/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json b/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json
index f723e8f7bb09..f723e8f7bb09 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json b/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json
index 982eda48785e..982eda48785e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json b/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json
index 1b7b1dd36c68..1b7b1dd36c68 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json b/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json
index fd7d7c438226..fd7d7c438226 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/jkt-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json b/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json
index 27e636428f4f..27e636428f4f 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json b/lib/libpmc/pmu-events/arch/x86/jaketown/other.json
index 64b195b82c50..64b195b82c50 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json b/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json
index 8a597e45ed84..8a597e45ed84 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json
index 3fa61d962607..3fa61d962607 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json
index 1b53c0e609e3..1b53c0e609e3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-interconnect.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-interconnect.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json
index 8551cebeba23..8551cebeba23 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json
index 16034bfd06dd..16034bfd06dd 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/uncore-power.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json
index a654ab771fce..a654ab771fce 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/jaketown/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/jaketown/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json
index 88ba5994b994..88ba5994b994 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json
index 6d38636689a4..6d38636689a4 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json
index 700652566200..700652566200 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json
index bb5494cfb5ae..bb5494cfb5ae 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json
index e3bcd86c4f56..e3bcd86c4f56 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json
index f31594507f8c..f31594507f8c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/knightslanding/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv b/lib/libpmc/pmu-events/arch/x86/mapfile.csv
index 93656f2fd53a..fe1a2c47cabf 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/mapfile.csv
+++ b/lib/libpmc/pmu-events/arch/x86/mapfile.csv
@@ -23,7 +23,10 @@ GenuineIntel-6-1E,v2,nehalemep,core
GenuineIntel-6-1F,v2,nehalemep,core
GenuineIntel-6-1A,v2,nehalemep,core
GenuineIntel-6-2E,v2,nehalemex,core
-GenuineIntel-6-[4589]E,v24,skylake,core
+GenuineIntel-6-4E,v24,skylake,core
+GenuineIntel-6-5E,v24,skylake,core
+GenuineIntel-6-8E,v24,skylake,core
+GenuineIntel-6-9E,v24,skylake,core
GenuineIntel-6-37,v13,silvermont,core
GenuineIntel-6-4D,v13,silvermont,core
GenuineIntel-6-4C,v13,silvermont,core
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json
index a11029efda2f..a11029efda2f 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json
index 7d2f71a9dee3..7d2f71a9dee3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json
index e5e21e03444d..e5e21e03444d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json
index f914a4525b65..f914a4525b65 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json
index af0860622445..af0860622445 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json
index 41006ddcd893..41006ddcd893 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json
index 0596094e0ee9..0596094e0ee9 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemep/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemep/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json
index 21a0f8fd057e..21a0f8fd057e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json
index 7d2f71a9dee3..7d2f71a9dee3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json
index e5e21e03444d..e5e21e03444d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json
index f914a4525b65..f914a4525b65 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json
index af0860622445..af0860622445 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json
index 41006ddcd893..41006ddcd893 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json
index 0596094e0ee9..0596094e0ee9 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/nehalemex/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/nehalemex/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json
index bef73c499f83..bef73c499f83 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json
index 982eda48785e..982eda48785e 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json
index 1b7b1dd36c68..1b7b1dd36c68 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json
index e6dfa89d00f3..e6dfa89d00f3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json
index 64b195b82c50..64b195b82c50 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json
index 8a597e45ed84..8a597e45ed84 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json
index fd7d7c438226..fd7d7c438226 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/snb-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json
index 42c70eed05a2..42c70eed05a2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/uncore.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/uncore.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json
index a654ab771fce..a654ab771fce 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/sandybridge/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json b/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json
index 82be7d1b8b81..82be7d1b8b81 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/silvermont/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json b/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json
index 204473badf5a..204473badf5a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/silvermont/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/silvermont/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json b/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json
index d72e09a5f929..d72e09a5f929 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/silvermont/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/silvermont/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json b/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json
index 7468af99190a..7468af99190a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/silvermont/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json
index ad31479f8f60..ad31479f8f60 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/silvermont/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/silvermont/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json b/lib/libpmc/pmu-events/arch/x86/skylake/cache.json
index 54bfe9e4045c..54bfe9e4045c 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json b/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json
index 213dd6230cf2..213dd6230cf2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json b/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json
index 578dff5bd823..578dff5bd823 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json b/lib/libpmc/pmu-events/arch/x86/skylake/memory.json
index 3bd8b712c889..3bd8b712c889 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json b/lib/libpmc/pmu-events/arch/x86/skylake/other.json
index 84a316d380ac..84a316d380ac 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json b/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json
index bc6d2afbcd8a..bc6d2afbcd8a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json b/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json
index 36c903faed0b..36c903faed0b 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/skl-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json b/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json
index dbc193252fb3..dbc193252fb3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/uncore.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/uncore.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json
index 2bcba7daca14..2bcba7daca14 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylake/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylake/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json b/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json
index 5c9940866acd..5c9940866acd 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json b/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json
index 286ed1a37ec9..286ed1a37ec9 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json b/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json
index 403a4f89e9b2..403a4f89e9b2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json b/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json
index e7f1aa31226d..e7f1aa31226d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json b/lib/libpmc/pmu-events/arch/x86/skylakex/other.json
index 778a541463eb..778a541463eb 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json b/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json
index f99f7ae27820..f99f7ae27820 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json b/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json
index 36c903faed0b..36c903faed0b 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/skx-metrics.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json b/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json
index 9c7e5f8beee2..9c7e5f8beee2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json b/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json
index de6e70e552e2..de6e70e552e2 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/uncore-other.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json
index 7f466c97e485..7f466c97e485 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/skylakex/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/skylakex/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json
index 6e61ae20d01a..6e61ae20d01a 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json
index 7d2f71a9dee3..7d2f71a9dee3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json
index e5e21e03444d..e5e21e03444d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json
index 6e0829b7617f..6e0829b7617f 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json
index 85133d6a5ce0..85133d6a5ce0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json
index f130510f7616..f130510f7616 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json
index 57b53562e2bd..57b53562e2bd 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-dp/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-dp/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json
index dad20f0e3cac..dad20f0e3cac 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json
index 7d2f71a9dee3..7d2f71a9dee3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json
index e5e21e03444d..e5e21e03444d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json
index 90eb6aac357b..90eb6aac357b 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json
index 85133d6a5ce0..85133d6a5ce0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json
index f130510f7616..f130510f7616 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json
index 2153b3f5d7b0..2153b3f5d7b0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereep-sp/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereep-sp/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json b/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json
index f9bc7fdd48d6..f9bc7fdd48d6 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/cache.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/cache.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json b/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json
index 7d2f71a9dee3..7d2f71a9dee3 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/floating-point.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/floating-point.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json b/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json
index e5e21e03444d..e5e21e03444d 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/frontend.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/frontend.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json b/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json
index 3ba555e73cbd..3ba555e73cbd 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/memory.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json b/lib/libpmc/pmu-events/arch/x86/westmereex/other.json
index 85133d6a5ce0..85133d6a5ce0 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/other.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/other.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json b/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json
index 799c57d94c39..799c57d94c39 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/pipeline.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/pipeline.json
diff --git a/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json b/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json
index ad989207e8f8..ad989207e8f8 100644
--- a/lib/libpmcstat/pmu-events/arch/x86/westmereex/virtual-memory.json
+++ b/lib/libpmc/pmu-events/arch/x86/westmereex/virtual-memory.json
diff --git a/lib/libpmcstat/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c
index 4f135772787a..4f135772787a 100644
--- a/lib/libpmcstat/pmu-events/jevents.c
+++ b/lib/libpmc/pmu-events/jevents.c
diff --git a/lib/libpmcstat/pmu-events/jevents.h b/lib/libpmc/pmu-events/jevents.h
index cd3d1c19021b..cd3d1c19021b 100644
--- a/lib/libpmcstat/pmu-events/jevents.h
+++ b/lib/libpmc/pmu-events/jevents.h
diff --git a/lib/libpmcstat/pmu-events/jsmn.c b/lib/libpmc/pmu-events/jsmn.c
index 3d4818a588da..3d4818a588da 100644
--- a/lib/libpmcstat/pmu-events/jsmn.c
+++ b/lib/libpmc/pmu-events/jsmn.c
diff --git a/lib/libpmcstat/pmu-events/jsmn.h b/lib/libpmc/pmu-events/jsmn.h
index 1f3b369cc44f..1f3b369cc44f 100644
--- a/lib/libpmcstat/pmu-events/jsmn.h
+++ b/lib/libpmc/pmu-events/jsmn.h
diff --git a/lib/libpmcstat/pmu-events/json.c b/lib/libpmc/pmu-events/json.c
index cc297bad8c59..cc297bad8c59 100644
--- a/lib/libpmcstat/pmu-events/json.c
+++ b/lib/libpmc/pmu-events/json.c
diff --git a/lib/libpmcstat/pmu-events/json.h b/lib/libpmc/pmu-events/json.h
index 871362aaf1da..871362aaf1da 100644
--- a/lib/libpmcstat/pmu-events/json.h
+++ b/lib/libpmc/pmu-events/json.h
diff --git a/lib/libpmcstat/pmu-events/list.h b/lib/libpmc/pmu-events/list.h
index 3a47e5637958..3a47e5637958 100644
--- a/lib/libpmcstat/pmu-events/list.h
+++ b/lib/libpmc/pmu-events/list.h
diff --git a/lib/libpmcstat/pmu-events/pmu-events.h b/lib/libpmc/pmu-events/pmu-events.h
index c4c01e20114d..c4c01e20114d 100644
--- a/lib/libpmcstat/pmu-events/pmu-events.h
+++ b/lib/libpmc/pmu-events/pmu-events.h
diff --git a/lib/libpmcstat/Makefile b/lib/libpmcstat/Makefile
index a20b14d174d4..5becabb5c957 100644
--- a/lib/libpmcstat/Makefile
+++ b/lib/libpmcstat/Makefile
@@ -9,30 +9,7 @@ SRCS= \
libpmcstat_logging.c \
libpmcstat_process.c \
libpmcstat_string.c \
- libpmcstat_symbol.c \
- libpmcstat_pmu_util.c
+ libpmcstat_symbol.c
INCS= libpmcstat.h
-CFLAGS+= -I${.CURDIR}
-
-.if ${MACHINE_CPUARCH} == "amd64"
-
-.if ${MACHINE_CPUARCH} == "aarch64"
-EVENT_ARCH="arm64"
-.elif ${MACHINE_CPUARCH} == "amd64"
-EVENT_ARCH="x86"
-.elif ${MACHINE_CPUARCH} == "powerpc"
-EVENT_ARCH="powerpc"
-.endif
-
-JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents
-# This file is built in a subdirectory so never try to rebuild
-# it here due to missing meta file.
-${JEVENTS}: .NOMETA
-
-libpmcstat_events.c: ${JEVENTS}
- ${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmcstat_events.c
-SRCS+= libpmcstat_events.c
-.endif
-
.include <bsd.lib.mk>
diff --git a/lib/libpmcstat/libpmcstat.h b/lib/libpmcstat/libpmcstat.h
index 77965b612e5c..3f5f2689f6b3 100644
--- a/lib/libpmcstat/libpmcstat.h
+++ b/lib/libpmcstat/libpmcstat.h
@@ -382,8 +382,6 @@ int pmcstat_analyze_log(struct pmcstat_args *args,
int pmcstat_open_log(const char *_p, int _mode);
int pmcstat_close_log(struct pmcstat_args *args);
-uint64_t pmcstat_pmu_sample_rate_get(const char *);
-
__END_DECLS
#endif /* !_LIBPMCSTAT_H_ */
diff --git a/lib/libpmcstat/libpmcstat_logging.c b/lib/libpmcstat/libpmcstat_logging.c
index 71ee524bbd8c..42054e636b4b 100644
--- a/lib/libpmcstat/libpmcstat_logging.c
+++ b/lib/libpmcstat/libpmcstat_logging.c
@@ -195,7 +195,6 @@ pmcstat_analyze_log(struct pmcstat_args *args,
int *ps_samples_period)
{
uint32_t cpu, cpuflags;
- uintfptr_t pc;
pid_t pid;
struct pmcstat_image *image;
struct pmcstat_process *pp, *ppnew;
@@ -268,44 +267,6 @@ pmcstat_analyze_log(struct pmcstat_args *args,
ev.pl_u.pl_mo.pl_end);
break;
- case PMCLOG_TYPE_PCSAMPLE:
- /*
- * Note: the `PCSAMPLE' log entry is not
- * generated by hpwmc(4) after version 2.
- */
-
- /*
- * We bring in the gmon file for the image
- * currently associated with the PMC & pid
- * pair and increment the appropriate entry
- * bin inside this.
- */
- pmcstat_stats->ps_samples_total++;
- *ps_samples_period += 1;
-
- pc = ev.pl_u.pl_s.pl_pc;
- pp = pmcstat_process_lookup(ev.pl_u.pl_s.pl_pid,
- PMCSTAT_ALLOCATE);
-
- /* Get PMC record. */
- pmcr = pmcstat_lookup_pmcid(ev.pl_u.pl_s.pl_pmcid, pmcstat_mergepmc);
- assert(pmcr != NULL);
- pmcr->pr_samples++;
-
- /*
- * Call the plugins processing
- * TODO: move pmcstat_process_find_map inside plugins
- */
-
- if (plugins[args->pa_pplugin].pl_process != NULL)
- plugins[args->pa_pplugin].pl_process(
- pp, pmcr, 1, &pc,
- pmcstat_process_find_map(pp, pc) != NULL, 0);
- plugins[args->pa_plugin].pl_process(
- pp, pmcr, 1, &pc,
- pmcstat_process_find_map(pp, pc) != NULL, 0);
- break;
-
case PMCLOG_TYPE_CALLCHAIN:
pmcstat_stats->ps_samples_total++;
*ps_samples_period += 1;
@@ -453,8 +414,8 @@ pmcstat_analyze_log(struct pmcstat_args *args,
return (PMCSTAT_RUNNING);
err(EX_DATAERR,
- "ERROR: event parsing failed (record %jd, offset 0x%jx)",
- (uintmax_t) ev.pl_count + 1, ev.pl_offset);
+ "ERROR: event parsing failed state: %d type: %d (record %jd, offset 0x%jx)",
+ ev.pl_state, ev.pl_type, (uintmax_t) ev.pl_count + 1, ev.pl_offset);
}
/*
diff --git a/lib/libpmcstat/libpmcstat_pmu_util.c b/lib/libpmcstat/libpmcstat_pmu_util.c
deleted file mode 100644
index 915856f1998a..000000000000
--- a/lib/libpmcstat/libpmcstat_pmu_util.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2018, Matthew Macy
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-#include <sys/types.h>
-#include <sys/errno.h>
-#include <sys/sysctl.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <pmc.h>
-#include <pmclog.h>
-#include <libpmcstat.h>
-#include "pmu-events/pmu-events.h"
-
-#if defined(__amd64__)
-struct pmu_alias {
- const char *pa_alias;
- const char *pa_name;
-};
-static struct pmu_alias pmu_alias_table[] = {
- { "UNHALTED_CORE_CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
- { "UNHALTED-CORE-CYCLES", "CPU_CLK_UNHALTED.THREAD_P_ANY"},
- { "LLC_MISSES", "LONGEST_LAT_CACHE.MISS"},
- { "LLC-MISSES", "LONGEST_LAT_CACHE.MISS"},
- { "LLC_REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"},
- { "LLC-REFERENCE", "LONGEST_LAT_CACHE.REFERENCE"},
- { "LLC_MISS_RHITM", "mem_load_l3_miss_retired.remote_hitm"},
- { "LLC-MISS-RHITM", "mem_load_l3_miss_retired.remote_hitm"},
- { "RESOURCE_STALL", "RESOURCE_STALLS.ANY"},
- { "RESOURCE_STALLS_ANY", "RESOURCE_STALLS.ANY"},
- { "BRANCH_INSTRUCTION_RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"},
- { "BRANCH-INSTRUCTION-RETIRED", "BR_INST_RETIRED.ALL_BRANCHES"},
- { "BRANCH_MISSES_RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
- { "BRANCH-MISSES-RETIRED", "BR_MISP_RETIRED.ALL_BRANCHES"},
- { NULL, NULL },
-};
-
-static const char *
-pmu_alias_get(const char *name)
-{
- struct pmu_alias *pa;
-
- for (pa = pmu_alias_table; pa->pa_alias != NULL; pa++)
- if (strcasecmp(name, pa->pa_alias) == 0)
- return (pa->pa_name);
- return (name);
-}
-
-struct pmu_event_desc {
- uint32_t ped_umask;
- uint32_t ped_event;
- uint64_t ped_period;
-};
-
-static const struct pmu_events_map *
-pmu_events_map_get(void)
-{
- size_t s;
- char buf[64];
- const struct pmu_events_map *pme;
-
- if (sysctlbyname("kern.hwpmc.cpuid", (void *)NULL, &s,
- (void *)NULL, 0) == -1)
- return (NULL);
- if (sysctlbyname("kern.hwpmc.cpuid", buf, &s,
- (void *)NULL, 0) == -1)
- return (NULL);
- for (pme = pmu_events_map; pme->cpuid != NULL; pme++)
- if (strcmp(buf, pme->cpuid) == 0)
- return (pme);
- return (NULL);
-}
-
-static const struct pmu_event *
-pmu_event_get(const char *event_name)
-{
- const struct pmu_events_map *pme;
- const struct pmu_event *pe;
-
- if ((pme = pmu_events_map_get()) == NULL)
- return (NULL);
- for (pe = pme->table; pe->name || pe->desc || pe->event; pe++) {
- if (pe->name == NULL)
- continue;
- if (strcasecmp(pe->name, event_name) == 0)
- return (pe);
- }
- return (NULL);
-}
-
-static int
-pmu_parse_event(struct pmu_event_desc *ped, const char *eventin)
-{
- char *event;
- char *kvp, *key, *value;
-
- if ((event = strdup(eventin)) == NULL)
- return (ENOMEM);
- bzero(ped, sizeof(*ped));
- while ((kvp = strsep(&event, ",")) != NULL) {
- key = strsep(&kvp, "=");
- if (key == NULL)
- abort();
- value = kvp;
- if (strcmp(key, "umask") == 0)
- ped->ped_umask = strtol(value, NULL, 16);
- if (strcmp(key, "event") == 0)
- ped->ped_event = strtol(value, NULL, 16);
- if (strcmp(key, "period") == 0)
- ped->ped_period = strtol(value, NULL, 10);
- }
- free(event);
- return (0);
-}
-
-uint64_t
-pmcstat_pmu_sample_rate_get(const char *event_name)
-{
- const struct pmu_event *pe;
- struct pmu_event_desc ped;
-
- event_name = pmu_alias_get(event_name);
- if ((pe = pmu_event_get(event_name)) == NULL)
- return (DEFAULT_SAMPLE_COUNT);
- if (pe->alias && (pe = pmu_event_get(pe->alias)) == NULL)
- return (DEFAULT_SAMPLE_COUNT);
- if (pe->event == NULL)
- return (DEFAULT_SAMPLE_COUNT);
- if (pmu_parse_event(&ped, pe->event))
- return (DEFAULT_SAMPLE_COUNT);
- return (ped.ped_period);
-}
-
-#else
-uint64_t pmcstat_pmu_sample_rate_get(const char *event_name __unused) { return (DEFAULT_SAMPLE_COUNT); }
-#endif