Hi Tyson, For `opcache.jit_optimization_level` I think we'd better remain these magic numbers, like what we did for `opcache.optimization_level`. I think this kind of setting requires professional knowledge in this domain, and it doesn't make much sense to change to the text-based Options. E.g. what does "minimal" mean in this context?
Regards, CHU Zhaowei -----Original Message----- From: tyson andre <tysonandre...@hotmail.com> Sent: Saturday, May 2, 2020 9:59 PM To: Benjamin Eberlei <kont...@beberlei.de>; PHP Internals <internals@lists.php.net> Subject: Re: [PHP-DEV] opcache.jit directive should be split up Hi Benjamin, > > I think it would be best to split up opcache.jit into five separate > > configuration directives and propose the following names: > > > > * opcache.jit for (de)activating JIT > > * opcache.jit_optimization_level for setting the optimization level > > * opcache.jit_trigger for configuring the JIT trigger > > * opcache.jit_register_allocation for configuring register > > allocation > > * opcache.jit_cpu_flags for configuring CPU-specific flags > > > > ... > > - We now have a bool opcache.jit and the "implicit" flag > opcache.jit_buffer_size which is 0 by default and leads to disabling > the JIT. Maybe we should turn these around and set opcache.jit=0 and > opcache.jit_buffer_size=16M (or whatever is a good default). I'd agree with that - I keep forgetting that `opcache.jit` isn't a boolean. To avoid confusion with the RFC and to be consistent with `opcache.enable` and `opcache.enable_cli`, I'd prefer `opcache.enable_jit={0,1}` over `opcache.jit`. Also, people who are reading a php.ini would not remember what `opcache.jit_optimization_level=1` means. Maybe supporting aliases for the 4 integer flags would be useful. (`opcache.jit_optimization_level={no,minimal,selective_inlining,jit_optimize _3,jit_optimize_4,jit_optimize_5|full}`) - I can't think of a good name for 3-5. Also, it's possible that even more aggressive settings may be added in the future. - Emit a startup error (or warn and use the default) if the alias or number is unrecognized. One possibility I thought of is to default the `jit_buffer_size` to a multiple of `opcache.memory_consumption`, which might be a reasonable default in most use cases. (Large codebases would get a large buffer, tiny scripts would get a small buffer). I'm not sure what that multiple should be or if there'd be a minimum that should be enforced. - If opcache.memory_consumption is somehow set to 0 or negative (file_cache_only?), maybe go with a default such as 16M. Thanks, - Tyson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php