diff options
author | Ben Byer <bbyer@freedesktop.org> | 2009-09-27 10:35:53 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-09-27 23:34:28 -0700 |
commit | b49dba33f94b51ba9a14803f0d81ccde2cb778f8 (patch) | |
tree | 7699fc023708c3b763518fe25083a6f3aa3b6e90 | |
parent | cf2e3312cff3f341e9edba8c321a4ca7ffd8748e (diff) |
Add (ok, fix) support for DTrace under OS X
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | dix/Makefile.am | 2 | ||||
-rw-r--r-- | dix/Xserver.d | 7 | ||||
-rw-r--r-- | os/Makefile.am | 2 |
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 422ef0bf7..7d0abca8f 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 13e5dedd7..23fe46007 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 .libs/*.o @@ -63,6 +64,7 @@ noinst_PROGRAMS = dix.O dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) ld -r -o $@ .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 $@ |