dtrace just work on OSX box. Yay

This commit is contained in:
Shuhei Tanuma 2012-07-13 12:59:15 +09:00
parent 48dfbd42f6
commit 232ed1f90d
5 changed files with 7 additions and 10 deletions

View File

@ -1,9 +1,5 @@
dtrace-fixup:
if test -f $(builddir)/.libs/phpuv.o ; then \
dtrace -h -C -s $(srcdir)/phpuv.d $(builddir)/.libs/phpuv.o ; \
else \
dtrace -h -C -s $(srcdir)/phpuv.d phpuv.lo ; \
fi
dtrace -h -s $(srcdir)/phpuv_dtrace.d; \
$(srcdir)/libuv/uv.a:
$(MAKE) -C $(srcdir)/libuv

View File

@ -26,7 +26,6 @@ fi
if test "$PHP_UV_DTRACE" != "no"; then
UV_SHARED_DEPENDENCIES=dtrace-fixup
UV_SHARED_LIBADD="phpuv.o -Wl,-M$srcdir/kludge.map"
PHP_ADD_LIBRARY(dtrace, UV_SHARED_LIBADD)
PHP_SUBST(UV_SHARED_DEPENDENCIES)

View File

@ -19,6 +19,7 @@
#include "php_uv.h"
#include "ext/standard/info.h"
#include "phpuv.h"
#ifndef PHP_UV_DEBUG
#define PHP_UV_DEBUG 0
@ -26,6 +27,7 @@
#include <dtrace.h>
#include <sys/sdt.h>
#include "phpuv_dtrace.h"
#define PHP_UV_INIT_UV(uv, uv_type) \
uv = (php_uv_t *)emalloc(sizeof(php_uv_t)); \
@ -1711,7 +1713,7 @@ static void php_uv_udp_send(int type, INTERNAL_FUNCTION_PARAMETERS)
PHP_MINIT_FUNCTION(uv)
{
DTRACE_PROBE(phpuv, minit)
PHPUV_TRACE_MINIT();
php_uv_init(TSRMLS_C);
uv_resource_handle = zend_register_list_destructors_ex(destruct_uv, NULL, PHP_UV_RESOURCE_NAME, module_number);

View File

@ -1,3 +0,0 @@
provider phpuv {
probe minit();
};

3
phpuv_dtrace.d Normal file
View File

@ -0,0 +1,3 @@
provider phpuv {
probe trace__minit();
};