aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2012-08-10 17:14:21 -0400
committerLaine Stump <laine@laine.org>2012-08-10 23:11:26 -0400
commit54264111ff557582b2793189143bec33a8006076 (patch)
treea2027d6712bf3180d6cb293bb869f98ba5de3b8f /src/Makefile.am
parentdocs/virsh: various minor fixes (diff)
downloadlibvirt-54264111ff557582b2793189143bec33a8006076.tar.gz
libvirt-54264111ff557582b2793189143bec33a8006076.tar.bz2
libvirt-54264111ff557582b2793189143bec33a8006076.zip
build: fix binary location in stap files --with-driver-modules
libvirt_qemu_probes.stp stopped working after switching to a build that used --with-driver-modules. This was because the symbols listed int libvirt_qemu_probes.stp are no longer in $(bindir)/libvirtd, but are now in $(libdir)/connection-driver/libvirt_driver_qemu.so. This patch enhances dtrace2systemtap.pl (which generates the .stp files from .d files) to look for a new "module" setting in the comments of the .d file (similar to the existing "binary" setting), and to look for a --with-modules option. If the --with-modules option is set *and* a "module" setting is present in the .d file, the process name for the stap line is set to $libdir/$module If either of these isn't true, it reverts to the old behavior. src/Makefile.am was also modified to add the --with-modules option when the build calls for it, and src/libvirt_qemu_probes.d has added a "module" line pointing to the correct .so file for the qemu driver.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 6ed4a41f3..79b4e5992 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1393,6 +1393,9 @@ nodist_libvirt_la_SOURCES = libvirt_probes.h
if WITH_REMOTE
nodist_libvirt_driver_remote_la_SOURCES = libvirt_probes.h
endif WITH_REMOTE
+if WITH_DRIVER_MODULES
+DTRACE2SYSTEMTAP_FLAGS = --with-modules
+endif
BUILT_SOURCES += libvirt_probes.h libvirt_probes.stp libvirt_functions.stp
@@ -1429,9 +1432,9 @@ RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \
libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@
-%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl
+%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl $(top_builddir)/config.status
$(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \
- $(bindir) $(sbindir) $(libdir) $< > $@
+ $(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@
CLEANFILES += libvirt_probes.h libvirt_probes.o libvirt_probes.lo \
libvirt_qemu_probes.h libvirt_qemu_probes.o \