Skip to content

Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1#11323

Closed
iluuu1994 wants to merge 1 commit into
php:PHP-8.2from
iluuu1994:fix-zend_jit_stop_counter_handlers-performance-issues
Closed

Fix zend_jit_stop_counter_handlers() performance issues with protect_memory=1#11323
iluuu1994 wants to merge 1 commit into
php:PHP-8.2from
iluuu1994:fix-zend_jit_stop_counter_handlers-performance-issues

Conversation

@iluuu1994

Copy link
Copy Markdown
Member

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.

…memory=1

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants