Hey:
I propose to disable zend_alwasy_inline while build PHP in debug mode.
that could be easier for debuging some bugs..
what do you think?
thanks
simple patch:
diff --git a/Zend/zend.h b/Zend/zend.h
index 40515fb..03bd4e7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -365,7 +365,7 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)
-#if defined(GNUC)
+#if defined(GNUC) && !ZEND_DEBUG
#if GNUC >= 3
#define zend_always_inline inline attribute((always_inline))
#define zend_never_inline attribute((noinline))
@@ -374,7 +374,7 @@ struct _zval_struct {
#define zend_never_inline
#endif
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !ZEND_DEBUG
#define zend_always_inline __forceinline
#define zend_never_inline
#else
--
Laruence Xinchen Hui
http://www.laruence.com/
Hey:
I propose to disable zend_alwasy_inline while build PHP in debug mode.
that could be easier for debuging some bugs..
what do you think?
thanks
simple patch:
diff --git a/Zend/zend.h b/Zend/zend.h
index 40515fb..03bd4e7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -365,7 +365,7 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)-#if defined(GNUC)
+#if defined(GNUC) && !ZEND_DEBUG
#if GNUC >= 3
#define zend_always_inline inline attribute((always_inline))
#define zend_never_inline attribute((noinline))
@@ -374,7 +374,7 @@ struct _zval_struct {
#define zend_never_inline
#endif-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !ZEND_DEBUG
#define zend_always_inline __forceinline
#define zend_never_inline
#else
I'm +1 with that.
Julien.Pauli
I ran some benchs, on my current machine (wasnt isolated to run tests). I
ran micro_bench.php on master branch today :
debug on, inline enabled :
Total 30.688
debug on, inline disabled :
Total 35.377
debug off, inline enabled :
Total 10.130
debug off, inline disabled :
Total 10.678
Julien.Pauli
Hey:
I propose to disable zend_alwasy_inline while build PHP in debug mode.
that could be easier for debuging some bugs..
what do you think?
thanks
simple patch:
diff --git a/Zend/zend.h b/Zend/zend.h
index 40515fb..03bd4e7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -365,7 +365,7 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)-#if defined(GNUC)
+#if defined(GNUC) && !ZEND_DEBUG
#if GNUC >= 3
#define zend_always_inline inline attribute((always_inline))
#define zend_never_inline attribute((noinline))
@@ -374,7 +374,7 @@ struct _zval_struct {
#define zend_never_inline
#endif-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !ZEND_DEBUG
#define zend_always_inline __forceinline
#define zend_never_inline
#elseI'm +1 with that.
Julien.Pauli
You can do it.
Thanks. Dmitry.
Hey:
I propose to disable zend_alwasy_inline while build PHP in debug mode.
that could be easier for debuging some bugs..
what do you think?
thanks
simple patch:
diff --git a/Zend/zend.h b/Zend/zend.h
index 40515fb..03bd4e7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -365,7 +365,7 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)-#if defined(GNUC)
+#if defined(GNUC) && !ZEND_DEBUG
#if GNUC >= 3
#define zend_always_inline inline attribute((always_inline))
#define zend_never_inline attribute((noinline))
@@ -374,7 +374,7 @@ struct _zval_struct {
#define zend_never_inline
#endif-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !ZEND_DEBUG
#define zend_always_inline __forceinline
#define zend_never_inline
#else--
Laruence Xinchen Hui
http://www.laruence.com/
You can do it.
thanks , committed in
https://github.com/php/php-src/commit/0444708c5cd665179a936b86369f84b9dad8effe
Thanks. Dmitry.
Hey:
I propose to disable zend_alwasy_inline while build PHP in debug mode.
that could be easier for debuging some bugs..
what do you think?
thanks
simple patch:
diff --git a/Zend/zend.h b/Zend/zend.h
index 40515fb..03bd4e7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -365,7 +365,7 @@ struct _zval_struct {
#define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref)-#if defined(GNUC)
+#if defined(GNUC) && !ZEND_DEBUG
#if GNUC >= 3
#define zend_always_inline inline attribute((always_inline))
#define zend_never_inline attribute((noinline))
@@ -374,7 +374,7 @@ struct _zval_struct {
#define zend_never_inline
#endif-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && !ZEND_DEBUG
#define zend_always_inline __forceinline
#define zend_never_inline
#else--
Laruence Xinchen Hui
http://www.laruence.com/
--
Laruence Xinchen Hui
http://www.laruence.com/