diff options
author | Levi Morrison <levim@php.net> | 2020-09-01 09:57:49 -0600 |
---|---|---|
committer | Levi Morrison <levim@php.net> | 2020-09-01 09:59:59 -0600 |
commit | 66c3e900e2072c2f4bb8d112f7ecb73380e19102 (patch) | |
tree | c24979ff83bf2bece2e881687d6aed312b36510c /ext/opcache/ZendAccelerator.c | |
parent | bd8e0a96a57e4d2d409c2b8c5270e2b38d8c255a (diff) | |
download | php-git-66c3e900e2072c2f4bb8d112f7ecb73380e19102.tar.gz |
Add zend_observer API
Closes GH-5857.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9ee1a5b5d7..725b33d913 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -44,6 +44,7 @@ #include "zend_accelerator_util_funcs.h" #include "zend_accelerator_hash.h" #include "zend_file_cache.h" +#include "zend_observer.h" #include "ext/pcre/php_pcre.h" #include "ext/standard/md5.h" #include "ext/hash/php_hash.h" @@ -2977,6 +2978,15 @@ static zend_result accel_post_startup(void) } } +#ifdef HAVE_JIT + /* TODO Observer support for JIT */ + if (ZEND_OBSERVER_ENABLED) { + JIT_G(enabled) = 0; + JIT_G(on) = 0; + zend_accel_error(ACCEL_LOG_INFO, "Observer extension present. Disabling JIT."); + } +#endif + /* Initialize zend_func_info_rid */ zend_optimizer_startup(); |