Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

iluuu1994
Copy link
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