-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use capstone explicitly, drop oprofile (GH 10876) #10918
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nits, thank you @orlitzky!
Until now, libcapstone has been detected "automagically" and used for JIT disassembly whenever it is available on the system used to compile PHP. This can have some unintended consequences, however: many users have capstone installed for some other purpose, and are surprised to find that PHP breaks when capstone is later uninstalled. To address this, we have introduced a new --with-opcache-capstone flag that is disabled by default, and that makes the user's preference explicit. It is ignored unless the JIT is enabled.
Recently we have replaced the "automagic" detection of capstone at build time with a --with-opcache-capstone flag. The detection of oprofile causes similar problems and would likely have the same solution; however, it was suggested that we might remove oprofile altogether. So, this commit removes it: * Remove the detection bits from ext/opcache/config.m4. * Drop HAVE_OPROFILE ifdef blocks. * Delete ext/opcache/jit/zend_jit_oprofile.c. * Undefine the ZEND_JIT_DEBUG_OPROFILE constant.
Perfect, thank you for tackling this @orlitzky! |
No problem, thanks for your help. |
@@ -18,6 +18,12 @@ PHP_ARG_ENABLE([opcache-jit], | |||
[yes], | |||
[no]) | |||
|
|||
PHP_ARG_WITH([opcache-capstone],, | |||
[AS_HELP_STRING([--with-opcache-capstone], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --with-capstone
should be enough.
In general, we need the same flag for Windows.
it's great you kept udis86 yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think disambiguation of flags isn't a bad thing but either works for me.
#10952
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had second thoughts about --with-capstone
after seeing that all of the FPM flags were named --with-fpm-foo
, but FWIW I don't mind either way.
As suggested in #10876, we make our use of capstone explicit with a
--with-opcache-capstone
flag. Instead of something similar for oprofile, it has been removed.