[php-src] PR #11323: Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1
| From: | iluuu1994 | Date: | Thu, 25 May 2023 22:49:08 +0000 |
| Subject: | [php-src] PR #11323: Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22597@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11323
Author: iluuu1994
The function repeatedly calls mprotect() which is extremely slow. In our community build, the
Laravel tests went from ~6 minutes to ~4 hours. This issue only occurs with
opcache.protect_memory=1.
@dstogov Would you like to keep the
zend_shared_alloc_lock/zend_shared_alloc_unlock calls in its original
place? Iterating all functions should be very fast so repeatedly locking/unlocking could be more
trouble than worth it. I have not measured this though.