2005-04-19 04:01:25 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
LIB= pmc
|
|
|
|
|
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
|
|
|
|
|
2019-12-12 00:14:01 +00:00
|
|
|
.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
|
|
|
|
${MACHINE_ARCH} == "i386"
|
2018-05-26 19:29:19 +00:00
|
|
|
|
2018-05-31 22:26:55 +00:00
|
|
|
.if ${MACHINE_ARCH} == "aarch64"
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="arm64"
|
2018-05-31 22:26:55 +00:00
|
|
|
.elif ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="x86"
|
2018-05-31 22:26:55 +00:00
|
|
|
.elif ${MACHINE_ARCH} == "powerpc"
|
2018-05-26 19:29:19 +00:00
|
|
|
EVENT_ARCH="powerpc"
|
|
|
|
.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
|
|
|
|
|
|
|
libpmc_events.c: ${JEVENTS}
|
|
|
|
${JEVENTS} ${EVENT_ARCH} ${.CURDIR}/pmu-events/arch libpmc_events.c
|
|
|
|
SRCS+= libpmc_events.c
|
|
|
|
.endif
|
|
|
|
|
2019-04-14 00:06:49 +00:00
|
|
|
WARNS?= 3
|
|
|
|
|
|
|
|
CFLAGS+= -I${.CURDIR}
|
|
|
|
CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align
|
|
|
|
|
2019-09-17 06:07:08 +00:00
|
|
|
# Silence warnings about usage of deprecated std::auto_ptr
|
|
|
|
CXXWARNFLAGS+= -Wno-deprecated-declarations
|
|
|
|
|
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
|
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
|
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
|
2013-05-03 08:20:10 +00:00
|
|
|
MAN+= pmc.mips24k.3
|
|
|
|
MAN+= pmc.octeon.3
|
2008-09-16 16:57:14 +00:00
|
|
|
MAN+= pmc.p4.3
|
|
|
|
MAN+= pmc.p5.3
|
|
|
|
MAN+= pmc.p6.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
|
2018-07-27 21:25:01 +00:00
|
|
|
MAN+= pmc.xscale.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>
|