summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Byer <bbyer@freedesktop.org>2009-09-27 10:35:53 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-09-27 23:32:19 -0700
commitefacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe (patch)
tree9a8fa5483566a049932046decb2778386a445781
parentb3415187e92960cbff784108b5a3a8d130dc34c5 (diff)
Add (ok, fix) support for DTrace under OS X
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
-rw-r--r--.gitignore1
-rw-r--r--configure.ac8
-rw-r--r--dix/Makefile.am2
-rw-r--r--dix/Xserver.d7
-rw-r--r--os/Makefile.am2
5 files changed, 12 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 3fb73f061..3a8fe501d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,7 @@ xorg-server.pc
xorg-server-*.tar.bz2
xorg-server-*.tar.gz
stamp-h?
+dix/Xserver-dtrace.h
do-not-use-config.h
do-not-use-config.h.in
dix/dix.c
diff --git a/configure.ac b/configure.ac
index be4760a26..7fdcf5af1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,12 +85,6 @@ dnl ISDN trace program named dtrace
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
[Enable dtrace probes (default: enabled if dtrace found)]),
[WDTRACE=$withval], [WDTRACE=auto])
-dnl Darwin 9 has dtrace, but it doesn't support compilation into ELF...
-if test "x$WDTRACE" = xauto; then
- case $host_os in
- darwin*) WDTRACE="no" ;;
- esac
-fi
if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
if test "x$DTRACE" = "xnot_found" ; then
@@ -1250,7 +1244,7 @@ AC_DEFINE(XSYNC, 1, [Support XSync extension])
AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
-if test "x$WDTRACE" != "xno" ; then
+if test "x$WDTRACE" != "xno" && test "x$XQUARTZ" = "xno"; then
DIX_LIB='$(top_builddir)/dix/dix.O'
OS_LIB='$(top_builddir)/os/os.O'
else
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 764860ce3..85a8767d2 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -54,6 +54,7 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d
$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \
|| cp Xserver-dtrace.h.in $@
+if !XQUARTZ
# Generate dtrace object code for probes in libdix
dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
$(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
@@ -63,6 +64,7 @@ noinst_PROGRAMS = dix.O
dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
endif
+endif
dix.c:
touch $@
diff --git a/dix/Xserver.d b/dix/Xserver.d
index e4c9b8320..cea97e908 100644
--- a/dix/Xserver.d
+++ b/dix/Xserver.d
@@ -29,8 +29,13 @@
/*
* Xserver dtrace provider definition
*/
-
+#ifdef __APPLE__
+#define string char *
+#define pid_t uint32_t
+#define zoneid_t uint32_t
+#else
#include <sys/types.h>
+#endif
provider Xserver {
/* reqType, data, length, client id, request buffer */
diff --git a/os/Makefile.am b/os/Makefile.am
index f89da6ba2..9ce8ff274 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -41,6 +41,7 @@ endif
EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
$(XDMCP_SRCS) $(STRLCAT_SRCS)
+if !XQUARTZ
if XSERVER_DTRACE
# Generate dtrace object code for probes in libos & libdix
dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
@@ -51,6 +52,7 @@ noinst_PROGRAMS = os.O
os.O: dtrace.o $(am_libos_la_OBJECTS)
ld -r -o $@ dtrace.o .libs/*.o
endif
+endif
os.c:
touch $@