Bug 252487 - lang/php80 OPCache JIT doesn't work
Summary: lang/php80 OPCache JIT doesn't work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL: https://bugs.php.net/bug.php?id=80603
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-07 08:14 UTC by cevin.cheung
Modified: 2021-01-11 05:51 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback? (tz)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cevin.cheung 2021-01-07 08:14:47 UTC
PHPINFO web page:
Zend OPcache JIT: Not Available


configuration:
opcahce.enable=1
opcache.jit = 1205
opcache.jit_buffer_size = 128M
Comment 1 Torsten Zuehlsdorff freebsd_committer 2021-01-07 22:19:11 UTC
Just added the link to the PHP ticket. I can't locate the issue and i think the PHP team should have a look at it.
Comment 2 cevin.cheung 2021-01-09 03:22:04 UTC
(In reply to Torsten Zuehlsdorff from comment #1)

PHP 8.0.1 has been released. upgrade the ports tree?
Comment 3 cevin.cheung 2021-01-09 03:37:06 UTC
(In reply to Torsten Zuehlsdorff from comment #1)

Confirmed to be a bug, which has been fixed in PHP 8.0.1
Comment 4 cevin.cheung 2021-01-09 05:02:30 UTC
(In reply to Torsten Zuehlsdorff from comment #1)

if configuration args add `--enable-opcache` , maybe fix this problem.

but pkg: php80 this parameter does not appear to have been added
Comment 5 Torsten Zuehlsdorff freebsd_committer 2021-01-10 21:53:26 UTC
This issue is fixed now, thanks to samm and the commit rP560820.

Just compile php80-opcache.

Than put this into php.ini to enable JIT on CLI:

opcache.enable=1
opcache.jit_buffer_size=100M
opcache.enable_cli=1

Afterwards you can check it like this:
php -r "var_dump(opcache_get_status()['jit']);"
array(7) {
  ["enabled"]=>
  bool(true)
  ["on"]=>
  bool(true)
  ["kind"]=>
  int(5)
  ["opt_level"]=>
  int(4)
  ["opt_flags"]=>
  int(6)
  ["buffer_size"]=>
  int(104857584)
  ["buffer_free"]=>
  int(104855584)
}

Also add opcache.enable=1 to php.ini in order to enable JIT for the webserver! :)
Comment 6 cevin.cheung 2021-01-11 05:51:59 UTC
Thanks. It's work.