diff options
author | David Soria Parra <dsp@php.net> | 2010-04-24 13:32:30 +0000 |
---|---|---|
committer | David Soria Parra <dsp@php.net> | 2010-04-24 13:32:30 +0000 |
commit | 08b9fdc8a3bf29e27431b7907b5ea4973e9c7042 (patch) | |
tree | 2b27f135a1cfad5f4d90fd437710aec7777eaff1 /Zend/zend_exceptions.c | |
parent | fd42b5064c497e500e5745bf36d1b0ddd5bd34bd (diff) | |
download | php-git-08b9fdc8a3bf29e27431b7907b5ea4973e9c7042.tar.gz |
Add DTrace probes
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r-- | Zend/zend_exceptions.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 6d2460aef2..40c7b1cfd0 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -27,6 +27,7 @@ #include "zend_interfaces.h" #include "zend_exceptions.h" #include "zend_vm.h" +#include "zend_dtrace.h" zend_class_entry *default_exception_ce; zend_class_entry *error_exception_ce; @@ -82,6 +83,14 @@ void zend_exception_restore(TSRMLS_D) /* {{{ */ void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */ { +#ifdef HAVE_DTRACE + if (DTRACE_EXCEPTION_THROWN_ENABLED()) { + char *classname; + int name_len; + zend_get_object_classname(exception, &classname, &name_len); + DTRACE_EXCEPTION_THROWN(classname); + } + if (exception != NULL) { zval *previous = EG(exception); zend_exception_set_previous(exception, EG(exception) TSRMLS_CC); @@ -93,6 +102,7 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */ if (!EG(current_execute_data)) { zend_error(E_ERROR, "Exception thrown without a stack frame"); } +#endif /* HAVE_DTRACE */ if (zend_throw_exception_hook) { zend_throw_exception_hook(exception TSRMLS_CC); |