freebsd-skq/usr.sbin/pmc/Makefile

18 lines
285 B
Makefile
Raw Normal View History

pmc: Add new sub-command structured "pmc" utility This will manage pmc functionality with a more manageable structure of subcommands rather than the gradually accreted spaghetti logic of overlapping flags that exists in pmcstat. This is intended to ultimately have all the same functionality as pmcannotate+pmccontrol+pmcstat. Currently it just has "stat" and "system-stat" - counters for the process itself and counters for the system as a whole respectively (i.e. system-stat includes kernel threads). Note that the rusage results (page faults/context switches/ user/sys) for stat-system will not account for the system as a whole - only for the child process specified on the command line. Implementing stat was suggested by mjg@ and the output is based on that from Linux's "perf stat". % pmc stat -- make -j32 buildkernel -DNO_MODULES -ss > /dev/null 9598393 page faults # 0.674 M/sec 387085 voluntary csw # 0.027 M/sec 106989 involuntary csw # 0.008 M/sec 2763965982317 cycles 2542953049760 instructions # 0.920 inst/cycle 511562750157 branches 12917006881 branch-misses # 2.525% 17944429878 cache-references # 0.007 refs/inst 2205119560 cache-misses # 12.289% 43.74 real # 2019.72% cpu 795.09 user # 1817.72% cpu 88.35 sys # 202.00% cpu % make -j32 buildkernel -DNO_MODULES -ss > /dev/null & % sudo pmc stat-system cat ^C 103 page faults # 0.811 M/sec 4 voluntary csw # 0.031 M/sec 0 involuntary csw # 0.000 M/sec 2843639070514 cycles 2606171217438 instructions # 0.916 inst/cycle 522450422783 branches 13092862839 branch-misses # 2.506% 18592101113 cache-references # 0.007 refs/inst 2562878667 cache-misses # 13.785% 44.85 real # 0.00% cpu 0.00 user # 0.00% cpu 0.00 sys # 0.00% cpu
2018-05-29 20:28:34 +00:00
#
# $FreeBSD$
#
.include <src.opts.mk>
PROG_CXX= pmc
pmc: Add new sub-command structured "pmc" utility This will manage pmc functionality with a more manageable structure of subcommands rather than the gradually accreted spaghetti logic of overlapping flags that exists in pmcstat. This is intended to ultimately have all the same functionality as pmcannotate+pmccontrol+pmcstat. Currently it just has "stat" and "system-stat" - counters for the process itself and counters for the system as a whole respectively (i.e. system-stat includes kernel threads). Note that the rusage results (page faults/context switches/ user/sys) for stat-system will not account for the system as a whole - only for the child process specified on the command line. Implementing stat was suggested by mjg@ and the output is based on that from Linux's "perf stat". % pmc stat -- make -j32 buildkernel -DNO_MODULES -ss > /dev/null 9598393 page faults # 0.674 M/sec 387085 voluntary csw # 0.027 M/sec 106989 involuntary csw # 0.008 M/sec 2763965982317 cycles 2542953049760 instructions # 0.920 inst/cycle 511562750157 branches 12917006881 branch-misses # 2.525% 17944429878 cache-references # 0.007 refs/inst 2205119560 cache-misses # 12.289% 43.74 real # 2019.72% cpu 795.09 user # 1817.72% cpu 88.35 sys # 202.00% cpu % make -j32 buildkernel -DNO_MODULES -ss > /dev/null & % sudo pmc stat-system cat ^C 103 page faults # 0.811 M/sec 4 voluntary csw # 0.031 M/sec 0 involuntary csw # 0.000 M/sec 2843639070514 cycles 2606171217438 instructions # 0.916 inst/cycle 522450422783 branches 13092862839 branch-misses # 2.506% 18592101113 cache-references # 0.007 refs/inst 2562878667 cache-misses # 13.785% 44.85 real # 0.00% cpu 0.00 user # 0.00% cpu 0.00 sys # 0.00% cpu
2018-05-29 20:28:34 +00:00
MAN=
CXXFLAGS+= -O0 -std=c++14
CWARNFLAGS.gcc+= -Wno-redundant-decls
pmc: Add new sub-command structured "pmc" utility This will manage pmc functionality with a more manageable structure of subcommands rather than the gradually accreted spaghetti logic of overlapping flags that exists in pmcstat. This is intended to ultimately have all the same functionality as pmcannotate+pmccontrol+pmcstat. Currently it just has "stat" and "system-stat" - counters for the process itself and counters for the system as a whole respectively (i.e. system-stat includes kernel threads). Note that the rusage results (page faults/context switches/ user/sys) for stat-system will not account for the system as a whole - only for the child process specified on the command line. Implementing stat was suggested by mjg@ and the output is based on that from Linux's "perf stat". % pmc stat -- make -j32 buildkernel -DNO_MODULES -ss > /dev/null 9598393 page faults # 0.674 M/sec 387085 voluntary csw # 0.027 M/sec 106989 involuntary csw # 0.008 M/sec 2763965982317 cycles 2542953049760 instructions # 0.920 inst/cycle 511562750157 branches 12917006881 branch-misses # 2.525% 17944429878 cache-references # 0.007 refs/inst 2205119560 cache-misses # 12.289% 43.74 real # 2019.72% cpu 795.09 user # 1817.72% cpu 88.35 sys # 202.00% cpu % make -j32 buildkernel -DNO_MODULES -ss > /dev/null & % sudo pmc stat-system cat ^C 103 page faults # 0.811 M/sec 4 voluntary csw # 0.031 M/sec 0 involuntary csw # 0.000 M/sec 2843639070514 cycles 2606171217438 instructions # 0.916 inst/cycle 522450422783 branches 13092862839 branch-misses # 2.506% 18592101113 cache-references # 0.007 refs/inst 2562878667 cache-misses # 13.785% 44.85 real # 0.00% cpu 0.00 user # 0.00% cpu 0.00 sys # 0.00% cpu
2018-05-29 20:28:34 +00:00
LIBADD= kvm pmc m ncursesw pmcstat elf
2018-06-01 00:45:59 +00:00
SRCS= pmc.c pmc_util.c cmd_pmc_stat.c \
cmd_pmc_list.c cmd_pmc_filter.cc \
cmd_pmc_summary.cc
pmc: Add new sub-command structured "pmc" utility This will manage pmc functionality with a more manageable structure of subcommands rather than the gradually accreted spaghetti logic of overlapping flags that exists in pmcstat. This is intended to ultimately have all the same functionality as pmcannotate+pmccontrol+pmcstat. Currently it just has "stat" and "system-stat" - counters for the process itself and counters for the system as a whole respectively (i.e. system-stat includes kernel threads). Note that the rusage results (page faults/context switches/ user/sys) for stat-system will not account for the system as a whole - only for the child process specified on the command line. Implementing stat was suggested by mjg@ and the output is based on that from Linux's "perf stat". % pmc stat -- make -j32 buildkernel -DNO_MODULES -ss > /dev/null 9598393 page faults # 0.674 M/sec 387085 voluntary csw # 0.027 M/sec 106989 involuntary csw # 0.008 M/sec 2763965982317 cycles 2542953049760 instructions # 0.920 inst/cycle 511562750157 branches 12917006881 branch-misses # 2.525% 17944429878 cache-references # 0.007 refs/inst 2205119560 cache-misses # 12.289% 43.74 real # 2019.72% cpu 795.09 user # 1817.72% cpu 88.35 sys # 202.00% cpu % make -j32 buildkernel -DNO_MODULES -ss > /dev/null & % sudo pmc stat-system cat ^C 103 page faults # 0.811 M/sec 4 voluntary csw # 0.031 M/sec 0 involuntary csw # 0.000 M/sec 2843639070514 cycles 2606171217438 instructions # 0.916 inst/cycle 522450422783 branches 13092862839 branch-misses # 2.506% 18592101113 cache-references # 0.007 refs/inst 2562878667 cache-misses # 13.785% 44.85 real # 0.00% cpu 0.00 user # 0.00% cpu 0.00 sys # 0.00% cpu
2018-05-29 20:28:34 +00:00
.include <bsd.prog.mk>