freebsd-skq/share/examples
mmacy 810fccd58a hwpmc: add summary command and further metadata extensions
metadata changes:
- log pmc sample rate with pmcallocate
- log proc flags with thread / process logging
  to identify user vs kernel threads

fixes:
- use log cpuid to translate event id to event name

Implement rudimentary summary command to track sample
counts by thread and process name within a pmc log.

% make -j4 buildkernel >& /dev/null &
% sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15
% pmc summary foo
cpu_clk_unhalted.thread_p_any:
        idle: 138108207162
        clang-6.0: 105336158004
        sh: 72340108510
        make: 8642012963
        kernel: 7754011631
longest_lat_cache.miss:
        clang-6.0: 87502625
        sh: 40901227
        make: 5500165
        kernel: 3300099
        awk: 2000060

%  pmc summary -f ~/foo
idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 2000003
idle: 69054
clang-6.0: 52668
sh: 36170
make: 4321
kernel: 3877
hwpmc: proc(7445): 3319
awk: 1289
xargs: 357
rand_harvestq: 181
mtree: 102
intr: 53
zfskern: 31
usb: 7
pagedaemon: 4
ntpd: 3
syslogd: 1
acpi_thermal: 1
logger: 1
syncer: 1
snmptrapd: 1
sleep: 1
idx: 17 name: longest_lat_cache.miss rate: 100003
clang-6.0: 875
sh: 409
make: 55
kernel: 33
awk: 20
hwpmc: proc(7445): 14
xargs: 9
idle: 8
intr: 3
zfskern: 2
2018-06-06 02:48:09 +00:00
..
bhyve Fold constants and unify vnc variable names. 2018-02-02 17:52:09 +00:00
bootforth Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00
BSD_daemon SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
csh - Add two new subcommands to rc.subr: 2016-04-23 16:19:34 +00:00
diskless
drivers Remove 'All Rights Reserved' from the collection copyright and templates. 2018-05-09 02:02:49 +00:00
etc Remove 'All Rights Reserved' from the collection copyright and templates. 2018-05-09 02:02:49 +00:00
find_interface Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
FreeBSD_version Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
hast share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00
hwpmc hwpmc: add summary command and further metadata extensions 2018-06-06 02:48:09 +00:00
ibcs2
indent
ipfilter share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
ipfw share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00
IPv6
jails Attempt to make the parts that people are supposed to change stand out more 2016-11-13 17:28:32 +00:00
kld example cdev: use make_dev_s 2018-01-26 04:24:39 +00:00
libifconfig libifconfig: multiple feature additions 2018-02-23 03:11:43 +00:00
libusb20 SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
libvgl share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00
mdoc Remove 'All Rights Reserved' from the collection copyright and templates. 2018-05-09 02:02:49 +00:00
netgraph
perfmon Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
pf Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
ppi Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
ppp For the udp-client example, instruct user to add an entry for a udp based 2017-08-01 16:20:33 +00:00
printing Remove now bogus README 2017-10-30 00:36:08 +00:00
scsi_target share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00
ses Update share/examples/* to properly install /usr/share/examples. 2016-05-10 00:51:50 +00:00
smbfs share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
sunrpc examples: fix typo 2017-12-29 23:58:05 +00:00
tests General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
uefisign Make the uefikeys script output slightly more obvious. 2015-02-26 14:22:27 +00:00
witness
ypldap ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3). 2016-01-13 01:49:35 +00:00
Makefile Convert share/examples/Makefile over to using FILES and FILESDIR. 2018-05-09 13:53:10 +00:00
Makefile.depend DIRDEPS_BUILD: Fix staging of share/sendmail and share/examples. 2016-03-11 23:45:09 +00:00