mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Up until now cpacfstats assumes that on the running hardware either all PAI and CPUMF are available or non at all. Which counters are supported may be hardware dependent and can vary in the future. With this commit cpacfstats dynamically loads the counters from sysfs entries in (/sys/devices/pai_crypto/events/) and (/sys/devices/cpum_cf/events/) respectively. Additionally cpacfstats has a new way of determining which PAI counters are meant for kernel usage. Signed-off-by: Finn Callies <fcallies@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
43 lines
918 B
Makefile
43 lines
918 B
Makefile
include ../common.mak
|
|
|
|
ifeq (${HAVE_LIBUDEV},0)
|
|
|
|
all:
|
|
$(SKIP) HAVE_LIBUDEV=0
|
|
|
|
install:
|
|
$(SKIP) HAVE_LIBUDEV=0
|
|
|
|
else
|
|
|
|
check_dep:
|
|
$(call check_dep, \
|
|
"cpacfstatsd", \
|
|
"libudev.h", \
|
|
"systemd-devel", \
|
|
"HAVE_LIBUDEV=0")
|
|
|
|
ALL_CPPFLAGS += -DVERSION=$(VERSION)
|
|
|
|
all: check_dep cpacfstats cpacfstatsd
|
|
|
|
cpacfstatsd: cpacfstatsd.o stats_sock.o perf_crypto.o cpacfstats_common.o \
|
|
$(rootdir)/libutil/libutil.a
|
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -ludev -lpthread -o $@
|
|
|
|
cpacfstats: cpacfstats.o stats_sock.o cpacfstats_common.o
|
|
$(LINK) $(ALL_LDFLAGS) $^ $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
$(INSTALL) -m 755 cpacfstatsd $(DESTDIR)$(USRSBINDIR)
|
|
$(INSTALL) -m 755 cpacfstats $(DESTDIR)$(USRBINDIR)
|
|
$(INSTALL) -m 644 cpacfstatsd.8 $(DESTDIR)$(MANDIR)/man8
|
|
$(INSTALL) -m 644 cpacfstats.1 $(DESTDIR)$(MANDIR)/man1
|
|
|
|
endif
|
|
|
|
clean:
|
|
rm -f *.o *~ cpacfstatsd cpacfstats
|
|
|
|
.PHONY: all clean install check_dep
|