diff --git a/.gitignore b/.gitignore index 14a174adf..26b596c54 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,6 @@ vgcore.* Makefile Makefile.in -# Generated by dtrace(1) when doing an in-tree build. -/include/uv-dtrace.h - # Generated by gyp for android *.target.mk diff --git a/Makefile.am b/Makefile.am index 07d628d3e..371df711d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -307,46 +307,7 @@ libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 libuv_la_SOURCES += src/unix/sunos.c endif -if HAVE_DTRACE -BUILT_SOURCES = include/uv-dtrace.h -CLEANFILES += include/uv-dtrace.h -if FREEBSD -libuv_la_LDFLAGS += -lelf -endif -endif - -if DTRACE_NEEDS_OBJECTS -libuv_la_SOURCES += src/unix/uv-dtrace.d -libuv_la_DEPENDENCIES = src/unix/uv-dtrace.o -libuv_la_LIBADD = uv-dtrace.lo -CLEANFILES += src/unix/uv-dtrace.o src/unix/uv-dtrace.lo -endif - if HAVE_PKG_CONFIG pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @PACKAGE_NAME@.pc endif - -if HAVE_DTRACE -include/uv-dtrace.h: src/unix/uv-dtrace.d - $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $(top_srcdir)/$@ -endif - -if DTRACE_NEEDS_OBJECTS -SUFFIXES = .d - -src/unix/uv-dtrace.o: src/unix/uv-dtrace.d ${libuv_la_OBJECTS} - -# It's ok to specify the output here, because we have 1 .d file, and we process -# every created .o, most projects don't need to include more than one .d -.d.o: - $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -G -o $(top_builddir)/uv-dtrace.o -s $< \ - `find ${top_builddir}/src -name "*.o"` - $(AM_V_GEN)printf %s\\n \ - '# ${top_builddir}/uv-dtrace.lo - a libtool object file' \ - '# Generated by libtool (GNU libtool) 2.4' \ - '# libtool wants a .lo not a .o' \ - "pic_object='uv-dtrace.o'" \ - "non_pic_object='uv-dtrace.o'" \ - > ${top_builddir}/uv-dtrace.lo -endif diff --git a/configure.ac b/configure.ac index 8fa68d52d..a50e37f8b 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,6 @@ AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os],[netbsd*], [true], [false]) AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os],[openbsd*], [true], [false])]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) -PANDORA_ENABLE_DTRACE AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes) AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"]) AS_IF([test "x$PKG_CONFIG" != "x"], [ diff --git a/m4/.gitignore b/m4/.gitignore index 9d0f4af88..c44e4c292 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -1,5 +1,4 @@ # Ignore libtoolize-generated files. *.m4 !as_case.m4 -!dtrace.m4 -!libuv-check-flags.m4 \ No newline at end of file +!libuv-check-flags.m4 diff --git a/m4/dtrace.m4 b/m4/dtrace.m4 deleted file mode 100644 index 09f7dc89c..000000000 --- a/m4/dtrace.m4 +++ /dev/null @@ -1,66 +0,0 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl --------------------------------------------------------------------------- -dnl Macro: PANDORA_ENABLE_DTRACE -dnl --------------------------------------------------------------------------- -AC_DEFUN([PANDORA_ENABLE_DTRACE],[ - AC_ARG_ENABLE([dtrace], - [AS_HELP_STRING([--disable-dtrace], - [enable DTrace USDT probes. @<:@default=yes@:>@])], - [ac_cv_enable_dtrace="$enableval"], - [ac_cv_enable_dtrace="yes"]) - - AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[ - AC_CHECK_PROGS([DTRACE], [dtrace]) - AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[ - - AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[ - cat >conftest.d <<_ACEOF -provider Example { - probe increment(int); -}; -_ACEOF - $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero - AS_IF([test $? -eq 0],[ac_cv_dtrace_works=yes], - [ac_cv_dtrace_works=no]) - rm -f conftest.h conftest.d - ]) - AS_IF([test "x$ac_cv_dtrace_works" = "xyes"],[ - AC_DEFINE([HAVE_DTRACE], [1], [Enables DTRACE Support]) - AC_CACHE_CHECK([if dtrace should instrument object files], - [ac_cv_dtrace_needs_objects],[ - dnl DTrace on MacOSX does not use -G option - cat >conftest.d <<_ACEOF -provider Example { - probe increment(int); -}; -_ACEOF - cat > conftest.c <<_ACEOF -#include "conftest.h" -void foo() { - EXAMPLE_INCREMENT(1); -} -_ACEOF - $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero - $CC -c -o conftest.o conftest.c - $DTRACE -G -o conftest.d.o -s conftest.d conftest.o 2>/dev/zero - AS_IF([test $? -eq 0],[ac_cv_dtrace_needs_objects=yes], - [ac_cv_dtrace_needs_objects=no]) - rm -f conftest.d.o conftest.d conftest.h conftest.o conftest.c - ]) - ]) - AC_SUBST(DTRACEFLAGS) dnl TODO: test for -G on OSX - ac_cv_have_dtrace=yes - ])]) - -AM_CONDITIONAL([HAVE_DTRACE], [test "x$ac_cv_dtrace_works" = "xyes"]) -AM_CONDITIONAL([DTRACE_NEEDS_OBJECTS], - [test "x$ac_cv_dtrace_needs_objects" = "xyes"]) - -]) -dnl --------------------------------------------------------------------------- -dnl End Macro: PANDORA_ENABLE_DTRACE -dnl --------------------------------------------------------------------------- diff --git a/src/unix/core.c b/src/unix/core.c index 7add085fe..e6a076831 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -310,8 +310,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) { uv__update_time(loop); while (r != 0 && loop->stop_flag == 0) { - UV_TICK_START(loop, mode); - uv__update_time(loop); uv__run_timers(loop); uv__run_pending(loop); @@ -340,7 +338,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) { } r = uv__loop_alive(loop); - UV_TICK_STOP(loop, mode); if (mode & (UV_RUN_ONCE | UV_RUN_NOWAIT)) break; diff --git a/src/unix/internal.h b/src/unix/internal.h index d5bc3109f..b94508cba 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -306,12 +306,4 @@ UV_UNUSED(static char* uv__basename_r(const char* path)) { return s + 1; } - -#ifdef HAVE_DTRACE -#include "uv-dtrace.h" -#else -#define UV_TICK_START(arg0, arg1) -#define UV_TICK_STOP(arg0, arg1) -#endif - #endif /* UV_UNIX_INTERNAL_H_ */ diff --git a/uv.gyp b/uv.gyp index 27885d23f..f2fc90030 100644 --- a/uv.gyp +++ b/uv.gyp @@ -1,14 +1,4 @@ { - 'variables': { - 'uv_use_dtrace%': 'false', - # uv_parent_path is the relative path to libuv in the parent project - # this is only relevant when dtrace is enabled and libuv is a child project - # as it's necessary to correctly locate the object files for post - # processing. - # XXX gyp is quite sensitive about paths with double / they don't normalize - 'uv_parent_path': '/', - }, - 'target_defaults': { 'conditions': [ ['OS != "win"', { @@ -296,20 +286,6 @@ ['uv_library=="shared_library"', { 'defines': [ 'BUILDING_UV_SHARED=1' ] }], - # FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly. - ['uv_use_dtrace=="true"', { - 'defines': [ 'HAVE_DTRACE=1' ], - 'dependencies': [ 'uv_dtrace_header' ], - 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ], - 'conditions': [ - [ 'OS not in "mac linux"', { - 'sources': [ 'src/unix/dtrace.c' ], - }], - [ 'OS=="linux"', { - 'sources': [ '<(SHARED_INTERMEDIATE_DIR)/dtrace.o' ] - }], - ], - }], ] }, @@ -522,60 +498,5 @@ }, }, }, - - { - 'target_name': 'uv_dtrace_header', - 'type': 'none', - 'conditions': [ - [ 'uv_use_dtrace=="true"', { - 'actions': [ - { - 'action_name': 'uv_dtrace_header', - 'inputs': [ 'src/unix/uv-dtrace.d' ], - 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/uv-dtrace.h' ], - 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)', - '-o', '<@(_outputs)' ], - }, - ], - }], - ], - }, - - # FIXME(bnoordhuis or tjfontaine) Unify this, it's extremely ugly. - { - 'target_name': 'uv_dtrace_provider', - 'type': 'none', - 'conditions': [ - [ 'uv_use_dtrace=="true" and OS not in "mac linux"', { - 'actions': [ - { - 'action_name': 'uv_dtrace_o', - 'inputs': [ - 'src/unix/uv-dtrace.d', - '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/core.o', - ], - 'outputs': [ - '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/dtrace.o', - ], - 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)', - '-o', '<@(_outputs)' ] - } - ] - }], - [ 'uv_use_dtrace=="true" and OS=="linux"', { - 'actions': [ - { - 'action_name': 'uv_dtrace_o', - 'inputs': [ 'src/unix/uv-dtrace.d' ], - 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/dtrace.o' ], - 'action': [ - 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)' - ], - } - ] - }], - ] - }, - ] }