Commit graph

29 commits

Author SHA1 Message Date
Max Kellermann
b47bfd698d ext/opcache: C++ compatibility
Just in case somebody includes those headers from C++ code.  The same
already exists in other opcache headers.
2023-01-12 15:14:05 +00:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
dd86987b2c
Replay warnings during inheritance (#6928)
Since 3e6b447979 it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.

Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.
2021-04-29 16:37:53 +02:00
Dmitry Stogov
c732ab400a Change Zend Stream API to use zend_string* instead of char*.
This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
2021-03-16 20:31:36 +03:00
Dmitry Stogov
4b79dba932 Added Inheritance Cache.
This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP  classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.

Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).

The patch shows 8% improvement on Symphony "Hello World" app.
2021-02-09 22:53:57 +03:00
George Peter Banyard
a1fee87c9a Drop useless zend_accel_script_persistable() function 2020-07-17 17:00:42 +02:00
Dmitry Stogov
da919a8b65 Remove copyright years. 2019-02-05 10:33:28 +03:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Dmitry Stogov
44e1d2f8a9 Merge branch 'PHP-7.2'
* PHP-7.2:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference.
2018-03-06 03:00:46 +03:00
Dmitry Stogov
020a02ef9d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference.
2018-03-06 02:47:01 +03:00
Dmitry Stogov
50949c9332 Replaced usafe reference from SHM to process memory with SHM to SHM reference. 2018-03-06 02:43:26 +03:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Anatol Belski
f24e597c85 Constify key access for hash and formal params
Keys created in shared memory and won't be modified and are free'd on
restart. Otherwise, keys passed to functions should not be modified,
too.
2017-10-19 12:07:08 +02:00
Anatol Belski
5315cea6e2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Backport 7ff13badda into 7.0+
2017-10-18 16:27:31 +02:00
Anatol Belski
d82805f097 Backport 7ff13badda into 7.0+ 2017-10-18 16:02:56 +02:00
Dmitry Stogov
7ff13badda Fixed required SHM memeory size calculation for scripts when opcache.revalidate_path is set. 2017-10-18 14:26:44 +03:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Dmitry Stogov
a62ffb72f4 Renamed Zend Optimizer+ into Zend OPcache 2013-03-19 10:32:24 +04:00
Dmitry Stogov
34d3202eda Merge Zend Optimizer+
git-subtree-dir: ext/opcache
git-subtree-mainline: b1dbfb7357
git-subtree-split: 8d35170c5f
2013-03-16 00:41:46 +04:00