aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/Makefile
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-31 09:13:27 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-31 09:13:27 +0000
commitd66e065f7f5e8ded336a4ad42a99ab98b00d1083 (patch)
treefe8a8def386d2661928bc9566cf490a17d755581 /tools/xenstore/Makefile
parent87fdf3231c5f7998037b1962506dd1bb81cd4ac3 (diff)
downloadxen-d66e065f7f5e8ded336a4ad42a99ab98b00d1083.tar.gz
xen-d66e065f7f5e8ded336a4ad42a99ab98b00d1083.tar.bz2
xen-d66e065f7f5e8ded336a4ad42a99ab98b00d1083.zip
Add DTrace support to xenstored
Add USDT probes for significant xenstore operations to allow dynamic tracing. Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/xenstore/Makefile')
-rw-r--r--tools/xenstore/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 3d6700c0b8..bf0ae4ed64 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -24,7 +24,7 @@ CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS))
XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_linux.o
-XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o
+XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o xenstored_probes.o
XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_netbsd.o
XENSTORED_OBJS += $(XENSTORED_OBJS_y)
@@ -32,6 +32,18 @@ XENSTORED_OBJS += $(XENSTORED_OBJS_y)
.PHONY: all
all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
+ifeq ($(CONFIG_SunOS),y)
+xenstored_probes.h: xenstored_probes.d
+ dtrace -C -h -s xenstored_probes.d
+
+xenstored_solaris.o: xenstored_probes.h
+
+xenstored_probes.o: xenstored_solaris.o
+ dtrace -C -G -s xenstored_probes.d xenstored_solaris.o
+
+CFLAGS += -DHAVE_DTRACE=1
+endif
+
xenstored: $(XENSTORED_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) $(LDFLAGS_libxenctrl) $(SOCKET_LIBS) -o $@
@@ -63,7 +75,7 @@ libxenstore.a: xs.o xs_lib.o
.PHONY: clean
clean:
- rm -f *.a *.o *.opic *.so*
+ rm -f *.a *.o *.opic *.so* xenstored_probes.h
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_tdb_dump xenstore-control xenstore-ls
rm -f $(CLIENTS)