Matt Macy
b2ca2e50b9
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
..
2018-06-04 02:05:48 +00:00
2018-06-05 05:24:42 +00:00
2018-06-05 05:24:42 +00:00
2018-06-05 11:03:24 +00:00
2018-06-03 03:53:11 +00:00
2018-06-05 15:49:35 +00:00
2018-06-04 16:20:22 +00:00
2018-06-04 22:26:47 +00:00
2018-05-19 18:27:14 +00:00
2018-05-25 13:59:48 +00:00
2018-06-06 02:48:09 +00:00
2018-05-04 14:38:48 +00:00
2018-06-04 11:35:04 +00:00
2018-03-06 14:28:37 +00:00
2018-05-09 20:53:38 +00:00
2018-04-20 19:37:08 +00:00
2018-06-04 02:05:48 +00:00
2018-03-11 20:13:15 +00:00
2018-06-05 04:26:40 +00:00
2018-06-04 18:47:14 +00:00
2018-05-24 23:58:57 +00:00
2018-05-31 22:41:07 +00:00
2018-06-05 21:24:59 +00:00
2018-03-30 18:50:13 +00:00
2018-05-24 00:06:55 +00:00
2018-06-05 21:24:59 +00:00
2018-06-05 21:24:59 +00:00
2018-06-05 20:51:01 +00:00
2018-05-30 07:11:33 +00:00
2018-05-09 18:47:24 +00:00
2018-05-23 21:02:14 +00:00
2018-05-23 21:02:14 +00:00
2018-04-19 15:24:21 +00:00
2018-06-02 20:28:58 +00:00
2018-05-16 16:56:35 +00:00
2018-05-30 21:50:23 +00:00
2018-05-24 21:11:28 +00:00
2018-06-06 02:48:09 +00:00
2018-05-29 08:41:44 +00:00
2018-05-18 17:29:43 +00:00
2018-03-24 21:30:24 +00:00
2018-05-19 19:30:42 +00:00
2018-06-04 19:35:15 +00:00
2018-05-29 16:16:24 +00:00
2018-05-25 08:44:00 +00:00