Index: Makefile.in =================================================================== --- Makefile.in (revision 892312) +++ Makefile.in (working copy) @@ -2,10 +2,17 @@ SUBDIRS = srclib os server modules support CLEAN_SUBDIRS = test +MPM_LIB = $(MPM_LIB:.la=.o) +PROGRAM_DEPENDENCIES_O = $(PROGRAM_DEPENDENCIES:.la=.o) +PROGRAM_DEPENDENCIES_OBJECTS = $(PROGRAM_DEPENDENCIES:.la=.objects) PROGRAM_NAME = $(progname) PROGRAM_SOURCES = modules.c -PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS) -PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c +PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) `cat $(PROGRAM_DEPENDENCIES_OBJECTS)` \ + `test -f probes.o && echo probes.o` $(EXTRA_LIBS) $(AP_LIBS) $(LIBS) \ + `./libtool-dep-extract $(PROGRAM_DEPENDENCIES)` +PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c && \ + $(DTRACE) $(DTRACEFLAGS) -G -s apache_probes.d -o probes.o \ + .libs/modules.o buildmark.o `cat $(PROGRAM_DEPENDENCIES_OBJECTS)` PROGRAM_DEPENDENCIES = \ server/libmain.la \ $(BUILTIN_LIBS) \ @@ -89,6 +96,16 @@ fi ; \ fi +install-dtrace: + @echo Installing DTrace library + @$(MKINSTALLDIRS) $(DESTDIR)/usr/lib/dtrace + @chown root:sys $(DESTDIR)/usr + @chown -R root:bin $(DESTDIR)/usr/lib + @chmod -R 0755 $(DESTDIR)/usr + @cp $(top_srcdir)/ap.d $(DESTDIR)/usr/lib/dtrace + @chown root:bin $(DESTDIR)/usr/lib/dtrace/ap.d + @chmod 0644 $(DESTDIR)/usr/lib/dtrace/ap.d + # Create a sanitized config_vars.mk build/config_vars.out: build/config_vars.mk @$(SHELL) build/config_vars.sh < build/config_vars.mk > build/config_vars.out Index: libtool-dep-extract =================================================================== --- libtool-dep-extract (revision 0) +++ libtool-dep-extract (revision 0) @@ -0,0 +1,6 @@ +#!/bin/sh + +for i in $* +do + sh -c ". $i; "'echo $dependency_libs' +done Property changes on: libtool-dep-extract ___________________________________________________________________ Name: svn:executable + * Index: server/Makefile.in =================================================================== --- server/Makefile.in (revision 892312) +++ server/Makefile.in (working copy) @@ -61,7 +61,7 @@ for dir in $(EXPORT_DIRS_APR); do \ (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \ done; \ - sort -u $$tmp > $@; \ + sort -u $$tmp | grep -v apache_probes.h > $@; \ rm -f $$tmp exports.c: export_files Index: server/core.c =================================================================== --- server/core.c (revision 892312) +++ server/core.c (working copy) @@ -20,7 +20,6 @@ #include "apr_fnmatch.h" #include "apr_hash.h" #include "apr_thread_proc.h" /* for RLIMIT stuff */ -#include "apr_hooks.h" #define APR_WANT_IOVEC #define APR_WANT_STRFUNC Index: server/core_filters.c =================================================================== --- server/core_filters.c (revision 892312) +++ server/core_filters.c (working copy) @@ -25,7 +25,6 @@ #include "apr_fnmatch.h" #include "apr_hash.h" #include "apr_thread_proc.h" /* for RLIMIT stuff */ -#include "apr_hooks.h" #define APR_WANT_IOVEC #define APR_WANT_STRFUNC Index: modules/proxy/ajp.h =================================================================== --- modules/proxy/ajp.h (revision 892312) +++ modules/proxy/ajp.h (working copy) @@ -29,7 +29,6 @@ #include "apr_version.h" #include "apr.h" -#include "apr_hooks.h" #include "apr_lib.h" #include "apr_strings.h" #include "apr_buckets.h" Index: modules/proxy/mod_proxy_scgi.c =================================================================== --- modules/proxy/mod_proxy_scgi.c (revision 892312) +++ modules/proxy/mod_proxy_scgi.c (working copy) @@ -25,8 +25,6 @@ #define APR_WANT_MEMFUNC #define APR_WANT_STRFUNC #include "apr_strings.h" -#include "apr_hooks.h" -#include "apr_optional_hooks.h" #include "apr_buckets.h" #include "httpd.h" Index: modules/proxy/mod_proxy.h =================================================================== --- modules/proxy/mod_proxy.h (revision 892312) +++ modules/proxy/mod_proxy.h (working copy) @@ -32,7 +32,6 @@ */ -#include "apr_hooks.h" #include "apr.h" #include "apr_lib.h" #include "apr_strings.h" Index: modules/cache/mod_cache.h =================================================================== --- modules/cache/mod_cache.h (revision 892312) +++ modules/cache/mod_cache.h (working copy) @@ -26,7 +26,6 @@ #ifndef MOD_CACHE_H #define MOD_CACHE_H -#include "apr_hooks.h" #include "apr.h" #include "apr_lib.h" #include "apr_strings.h" Index: modules/mappers/mod_vhost_alias.c =================================================================== --- modules/mappers/mod_vhost_alias.c (revision 892312) +++ modules/mappers/mod_vhost_alias.c (working copy) @@ -35,7 +35,6 @@ #include "apr.h" #include "apr_strings.h" -#include "apr_hooks.h" #include "apr_lib.h" #define APR_WANT_STRFUNC Index: modules/dav/main/mod_dav.h =================================================================== --- modules/dav/main/mod_dav.h (revision 892312) +++ modules/dav/main/mod_dav.h (working copy) @@ -26,7 +26,6 @@ #ifndef _MOD_DAV_H_ #define _MOD_DAV_H_ -#include "apr_hooks.h" #include "apr_hash.h" #include "apr_dbm.h" #include "apr_tables.h" Index: include/ap_config.h =================================================================== --- include/ap_config.h (revision 892312) +++ include/ap_config.h (working copy) @@ -23,6 +23,81 @@ #define AP_CONFIG_H #include "apr.h" + +#include "os.h" +#if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__) +#include "ap_config_auto.h" +#include "ap_config_layout.h" +#endif +#if defined(NETWARE) +#define AP_NONBLOCK_WHEN_MULTI_LISTEN 1 +#endif + +/* If APR has OTHER_CHILD logic, use reliable piped logs. */ +#if APR_HAS_OTHER_CHILD +#define AP_HAVE_RELIABLE_PIPED_LOGS TRUE +#endif + +/* Presume that the compiler supports C99-style designated + * initializers if using GCC (but not G++), or for any other compiler + * which claims C99 support. */ +#if (defined(__GNUC__) && !defined(__cplusplus)) \ + || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) +#define AP_HAVE_DESIGNATED_INITIALIZER +#endif + +#if AP_ENABLE_DTRACE + +/* define hook probes before including apr_hooks.h */ + +#if HAVE_SYS_SDT_H +#include +#endif + +#define APR_HOOK_PROBES_ENABLED + +/* hard-code provider to "ap" instead of using the hook namespace + * so that mod_proxy, mod_dav, and other such hooks with their own + * namespace are part of the "ap" provider + */ +#if 0 + +#define APR_HOOK_PROBE_ENTRY(ud,ns,name) \ + DTRACE_PROBE(ap, name##__entry); ud=NULL + +#define APR_HOOK_PROBE_RETURN(ud,ns,name,rv) \ + DTRACE_PROBE1(ap, name##__return, rv) + +#define APR_HOOK_PROBE_INVOKE(ud,ns,name,src) \ + DTRACE_PROBE1(ap, name##__dispatch__invoke, src) + +#define APR_HOOK_PROBE_COMPLETE(ud,ns,name,src,rv) \ + DTRACE_PROBE2(ap, name##__dispatch__complete, src, rv) + +#else + +#define APR_HOOK_PROBE_ENTRY(ud,ns,name) \ + __dtrace_ap___##name##__entry(); ud=NULL + +#define APR_HOOK_PROBE_RETURN(ud,ns,name,rv) \ + __dtrace_ap___##name##__return(rv) + +#define APR_HOOK_PROBE_INVOKE(ud,ns,name,src) \ + __dtrace_ap___##name##__dispatch__invoke(src) + +#define APR_HOOK_PROBE_COMPLETE(ud,ns,name,src,rv) \ + __dtrace_ap___##name##__dispatch__complete(src, rv) + +#endif + +#include "apache_probes.h" + +#else + +#include "apache_noprobes.h" + +#endif /* AP_ENABLE_DTRACE */ + #include "apr_hooks.h" #include "apr_optional_hooks.h" @@ -229,38 +304,4 @@ #define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \ APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order) -#include "os.h" -#if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__) -#include "ap_config_auto.h" -#include "ap_config_layout.h" -#endif -#if defined(NETWARE) -#define AP_NONBLOCK_WHEN_MULTI_LISTEN 1 -#endif - -#if AP_ENABLE_DTRACE && HAVE_SYS_SDT_H -#include -#else -#undef _DTRACE_VERSION -#endif - -#ifdef _DTRACE_VERSION -#include "apache_probes.h" -#else -#include "apache_noprobes.h" -#endif - -/* If APR has OTHER_CHILD logic, use reliable piped logs. */ -#if APR_HAS_OTHER_CHILD -#define AP_HAVE_RELIABLE_PIPED_LOGS TRUE -#endif - -/* Presume that the compiler supports C99-style designated - * initializers if using GCC (but not G++), or for any other compiler - * which claims C99 support. */ -#if (defined(__GNUC__) && !defined(__cplusplus)) \ - || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) -#define AP_HAVE_DESIGNATED_INITIALIZER -#endif - #endif /* AP_CONFIG_H */ Index: configure.in =================================================================== --- configure.in (revision 892312) +++ configure.in (working copy) @@ -470,16 +470,11 @@ AC_ARG_ENABLE(dtrace,APACHE_HELP_STRING(--enable-dtrace,Enable DTrace probes), [ enable_dtrace=$enableval - APR_ADDTO(CPPFLAGS, -DAPR_DTRACE_PROVIDER) - AC_MSG_ERROR('DTrace Support in the build system is not complete. Patches Welcome!') ], [ enable_dtrace=no ]) -dnl Disabled dtrace build for now. -enable_dtrace=no - case $host in *-solaris2*) if test $enable_dtrace = "yes" -a "$ac_cv_header_sys_sdt_h" = "yes"; then @@ -555,6 +550,9 @@ AC_SUBST(PILDFLAGS) prefix="$orig_prefix" +cat >static_modules.mk<>static_modules.mk AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd.conf docs/conf/extra/httpd-autoindex.conf docs/conf/extra/httpd-dav.conf docs/conf/extra/httpd-default.conf docs/conf/extra/httpd-info.conf docs/conf/extra/httpd-languages.conf docs/conf/extra/httpd-manual.conf docs/conf/extra/httpd-mpm.conf docs/conf/extra/httpd-multilang-errordoc.conf docs/conf/extra/httpd-ssl.conf docs/conf/extra/httpd-userdir.conf docs/conf/extra/httpd-vhosts.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk build/pkg/pkginfo build/config_vars.sh,[true],[ APACHE_GEN_MAKEFILES Index: build/library.mk =================================================================== --- build/library.mk (revision 892312) +++ build/library.mk (working copy) @@ -17,6 +17,13 @@ # The build environment was provided by Sascha Schumann. LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X) +LTLIBRARY_CS = $(LTLIBRARY_SOURCES:%.h=) +LTLIBRARY_OS = $(LTLIBRARY_CS:.c=.o) +LTLIBRARY_FP_OS = $(LTLIBRARY_OS:%=$(builddir)/%) +LIBNAME=$(LTLIBRARY_NAME:.la=.o) +LIBLIST=$(LTLIBRARY_NAME:.la=.objects) $(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES) $(LINK) -static $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD) + echo $(LTLIBRARY_FP_OS) > $(LIBLIST) + ld -r -o $(LIBNAME) $(LTLIBRARY_OS) Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 892312) +++ acinclude.m4 (working copy) @@ -175,14 +175,40 @@ fi if test -z "$module_standalone"; then + cat >$modpath_current/probes_$1.libtool.hack<>$modpath_current/modules.mk< `echo $libname | sed -e 's/\.la/.objects/;'` EOF if test ! -z "$5"; then APR_ADDTO(AP_LIBS, [$5]) @@ -191,10 +217,24 @@ apache_need_shared=yes libname="mod_$1.la" shobjects=`echo $objects | sed 's/\.lo/.slo/g'` + realobjects=`echo $objects | sed -e 's/\.lo/.o/g;' -e 's/^/.libs\//g;' -e 's/ / .libs\//g;'` modpath_shared="$modpath_shared $libname" + if test -r "$modpath_current/probes_$1.d"; then + echo "Found probes for $1 [$DTRACE]" + BUILD_DTRACE="\$(DTRACE) \$(DTRACEFLAGS) -G -s \$(top_srcdir)/apache_probes.d -s probes_$1.d $realobjects && cp probes_$1.o .libs/probes_$1.o && cp probes_$1.libtool.hack probes_$1.lo" + DTRACE_OBJ=probes_$1.lo + $DTRACE $DTRACEFLAGS -h -o $modpath_current/probes_$1.h -s $modpath_current/probes_$1.d + RELINK="\$(CC) -shared \$(CFLAGS) -o .libs/mod_$1.so $realobjects .libs/probes_$1.o $5" + else + BUILD_DTRACE="\$(DTRACE) \$(DTRACEFLAGS) -G -o probes_$1.o -s \$(top_srcdir)/apache_probes.d $realobjects && cp probes_$1.o .libs/probes_$1.o && cp probes_$1.libtool.hack probes_$1.lo" + DTRACE_OBJ=probes_$1.lo + RELINK="\$(CC) -shared \$(CFLAGS) -o .libs/mod_$1.so $realobjects .libs/probes_$1.o $5" + fi cat >>$modpath_current/modules.mk<