2005-04-19 04:01:25 +00:00
|
|
|
|
2023-03-23 16:31:29 +00:00
|
|
|
LIB_CXX= pmc
|
2005-04-19 04:01:25 +00:00
|
|
|
|
2018-06-07 02:03:22 +00:00
|
|
|
SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc
|
|
|
|
INCS= pmc.h pmclog.h pmcformat.h
|
2005-04-19 04:01:25 +00:00
|
|
|
|
2020-03-25 02:28:47 +00:00
|
|
|
CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat
|
|
|
|
|
2020-09-14 16:12:28 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="arm64"
|
2021-05-31 20:20:08 +00:00
|
|
|
.elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="x86"
|
2021-05-31 20:24:15 +00:00
|
|
|
.elif ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH:Mpowerpc64*} != ""
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="powerpc"
|
2021-05-31 14:24:04 +00:00
|
|
|
.else
|
|
|
|
# This will generate an empty events table
|
|
|
|
EVENT_ARCH="none"
|
2018-05-26 19:29:19 +00:00
|
|
|
.endif
|
|
|
|
|
2019-12-11 17:38:15 +00:00
|
|
|
.if ${MK_DIRDEPS_BUILD} == "yes"
|
|
|
|
# avoid circular dependency
|
|
|
|
GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat
|
|
|
|
JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents
|
|
|
|
.else
|
2018-05-26 19:29:19 +00:00
|
|
|
JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents
|
2019-12-11 17:38:15 +00:00
|
|
|
|
2018-06-15 19:19:36 +00:00
|
|
|
# This file is built in a subdirectory so never try to rebuild it here.
|
|
|
|
${JEVENTS}: .PHONY
|
|
|
|
.if make(*clean*)
|
|
|
|
SUBDIR+= pmu-events
|
|
|
|
.endif
|
2019-12-11 17:38:15 +00:00
|
|
|
.endif
|
2018-05-26 19:29:19 +00:00
|
|
|
|
2020-07-15 12:07:47 +00:00
|
|
|
libpmc_events.c: ${JEVENTS} .META
|
|
|
|
${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch ${.TARGET}.tmp
|
|
|
|
if [ ! -e ${.TARGET} ] || ! cmp -s ${.TARGET} ${.TARGET}.tmp; then \
|
|
|
|
mv -f ${.TARGET}.tmp ${.TARGET}; \
|
|
|
|
fi
|
|
|
|
CLEANFILES+= libpmc_events.c libpmc_events.c.tmp
|
|
|
|
SRCS+= libpmc_events.c
|
2018-05-26 19:29:19 +00:00
|
|
|
|
2019-04-14 00:06:49 +00:00
|
|
|
WARNS?= 3
|
|
|
|
|
2022-08-31 08:09:18 +00:00
|
|
|
CFLAGS+= -I${.CURDIR} -I${SRCTOP}/sys
|
2019-04-14 00:06:49 +00:00
|
|
|
CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align
|
|
|
|
|
2007-11-25 03:18:42 +00:00
|
|
|
MAN= pmc.3
|
|
|
|
MAN+= pmc_allocate.3
|
2007-11-25 06:38:55 +00:00
|
|
|
MAN+= pmc_attach.3
|
|
|
|
MAN+= pmc_capabilities.3
|
2007-11-25 03:18:42 +00:00
|
|
|
MAN+= pmc_configure_logfile.3
|
|
|
|
MAN+= pmc_disable.3
|
|
|
|
MAN+= pmc_event_names_of_class.3
|
2007-11-25 06:38:55 +00:00
|
|
|
MAN+= pmc_get_driver_stats.3
|
|
|
|
MAN+= pmc_get_msr.3
|
2007-11-25 03:18:42 +00:00
|
|
|
MAN+= pmc_init.3
|
2007-11-25 06:38:55 +00:00
|
|
|
MAN+= pmc_name_of_capability.3
|
|
|
|
MAN+= pmc_read.3
|
|
|
|
MAN+= pmc_set.3
|
|
|
|
MAN+= pmc_start.3
|
2007-11-23 12:30:55 +00:00
|
|
|
MAN+= pmclog.3
|
2012-03-28 20:58:30 +00:00
|
|
|
MAN+= pmc.soft.3
|
2005-04-19 04:01:25 +00:00
|
|
|
|
2008-09-16 16:57:14 +00:00
|
|
|
# PMC-dependent manual pages
|
2008-10-04 12:27:49 +00:00
|
|
|
MAN+= pmc.atom.3
|
2014-03-20 20:51:08 +00:00
|
|
|
MAN+= pmc.atomsilvermont.3
|
2022-02-16 00:36:57 +00:00
|
|
|
MAN+= pmc.cmn-600.3
|
2008-10-04 12:27:49 +00:00
|
|
|
MAN+= pmc.core.3
|
|
|
|
MAN+= pmc.core2.3
|
2013-05-03 08:20:10 +00:00
|
|
|
MAN+= pmc.corei7.3
|
|
|
|
MAN+= pmc.corei7uc.3
|
2022-02-16 00:19:46 +00:00
|
|
|
MAN+= pmc.dmc-620.3
|
2013-03-28 19:15:54 +00:00
|
|
|
MAN+= pmc.haswell.3
|
|
|
|
MAN+= pmc.haswelluc.3
|
2016-03-01 11:34:44 +00:00
|
|
|
MAN+= pmc.haswellxeon.3
|
2008-10-04 12:27:49 +00:00
|
|
|
MAN+= pmc.iaf.3
|
2012-09-06 13:54:01 +00:00
|
|
|
MAN+= pmc.ivybridge.3
|
2013-01-31 22:09:53 +00:00
|
|
|
MAN+= pmc.ivybridgexeon.3
|
2008-09-16 16:57:14 +00:00
|
|
|
MAN+= pmc.k7.3
|
|
|
|
MAN+= pmc.k8.3
|
2012-03-01 21:23:26 +00:00
|
|
|
MAN+= pmc.sandybridge.3
|
2013-05-03 08:20:10 +00:00
|
|
|
MAN+= pmc.sandybridgeuc.3
|
|
|
|
MAN+= pmc.sandybridgexeon.3
|
|
|
|
MAN+= pmc.tsc.3
|
|
|
|
MAN+= pmc.ucf.3
|
2010-04-02 13:23:49 +00:00
|
|
|
MAN+= pmc.westmere.3
|
|
|
|
MAN+= pmc.westmereuc.3
|
2008-09-16 16:57:14 +00:00
|
|
|
|
2005-04-19 04:01:25 +00:00
|
|
|
MLINKS+= \
|
2007-11-23 11:46:08 +00:00
|
|
|
pmc_allocate.3 pmc_release.3 \
|
2007-11-25 06:38:55 +00:00
|
|
|
pmc_attach.3 pmc_detach.3 \
|
|
|
|
pmc_capabilities.3 pmc_ncpu.3 \
|
|
|
|
pmc_capabilities.3 pmc_npmc.3 \
|
|
|
|
pmc_capabilities.3 pmc_pmcinfo.3 \
|
|
|
|
pmc_capabilities.3 pmc_cpuinfo.3 \
|
|
|
|
pmc_capabilities.3 pmc_width.3 \
|
2007-11-25 03:18:42 +00:00
|
|
|
pmc_configure_logfile.3 pmc_flush_logfile.3 \
|
|
|
|
pmc_configure_logfile.3 pmc_writelog.3 \
|
2007-11-23 12:21:34 +00:00
|
|
|
pmc_disable.3 pmc_enable.3 \
|
2007-11-24 11:05:36 +00:00
|
|
|
pmc_name_of_capability.3 pmc_name_of_class.3 \
|
|
|
|
pmc_name_of_capability.3 pmc_name_of_cputype.3 \
|
|
|
|
pmc_name_of_capability.3 pmc_name_of_disposition.3 \
|
|
|
|
pmc_name_of_capability.3 pmc_name_of_event.3 \
|
|
|
|
pmc_name_of_capability.3 pmc_name_of_mode.3 \
|
|
|
|
pmc_name_of_capability.3 pmc_name_of_state.3 \
|
2007-11-25 06:38:55 +00:00
|
|
|
pmc_read.3 pmc_rw.3 \
|
|
|
|
pmc_read.3 pmc_write.3 \
|
|
|
|
pmc_start.3 pmc_stop.3
|
2005-04-19 04:01:25 +00:00
|
|
|
|
2005-06-09 19:45:09 +00:00
|
|
|
MLINKS+= \
|
|
|
|
pmclog.3 pmclog_open.3 \
|
|
|
|
pmclog.3 pmclog_close.3 \
|
|
|
|
pmclog.3 pmclog_feed.3 \
|
|
|
|
pmclog.3 pmclog_read.3
|
|
|
|
|
2005-04-19 04:01:25 +00:00
|
|
|
.include <bsd.lib.mk>
|