summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_shared_alloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Added Inheritance Cache.Dmitry Stogov2021-02-091-24/+9
| | | | | | | | | | 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.
* Replace zend_bool uses with boolNikita Popov2021-01-151-1/+1
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Use zend_accel_error_noreturn in more placesNikita Popov2020-10-191-10/+10
| | | | | Missed the place in accelerator_blacklist that was the actual motivation here...
* Merge branch 'PHP-7.4'Nikita Popov2019-06-281-0/+4
|\
| * Free ZTS lock in opcacheNikita Popov2019-06-281-0/+4
| | | | | | | | For some reason this only shows up as a leak when using phpdbg.
* | Fix VirtualProtect memory sizeAnatol Belski2019-04-111-1/+1
| | | | | | | | | | | | As otherwise it would remove executable flag from JIT memory Thanks Dmitry for the hint :)
* | Merge branch 'PHP-7.4'Nikita Popov2019-04-101-0/+19
|\ \ | |/
| * Support VirtualProtect for opcache.protect_memoryNikita Popov2019-04-101-0/+19
| | | | | | | | | | Don't enable this on AppVeyor yet, as there is still an open issue in phar.
* | Added JIT compiler for x86 and x86_64Dmitry Stogov2019-04-011-7/+24
|/
* Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-02-121-6/+15
|\ | | | | | | | | * PHP-7.3: Avoid dependency on "struct flock" fields order.
| * Merge branch 'PHP-7.2' into PHP-7.3Dmitry Stogov2019-02-121-6/+15
| |\ | | | | | | | | | | | | * PHP-7.2: Avoid dependency on "struct flock" fields order.
| | * Avoid dependency on "struct flock" fields order.Dmitry Stogov2019-02-121-6/+15
| | |
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| * | Future-proof email addressesZeev Suraski2018-11-011-3/+3
| | |
* | | Remove copyright years.Dmitry Stogov2019-02-051-1/+1
| | |
* | | Future-proof email addresses...Zeev Suraski2018-11-011-3/+3
| | |
* | | Don't use request heap at shutdownDmitry Stogov2018-10-251-2/+9
| | |
* | | Immutable clases and op_arrays.Dmitry Stogov2018-10-171-9/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit cd0c36c3f943849e5b97a8dbe2dd029fbeab3df9 Merge: 4740dabb84 ad6738e886 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 14:43:38 2018 +0300 Merge branch 'master' into immutable * master: Remove the "auto" encoding Fixed bug #77025 Add vtbls for EUC-TW encoding commit 4740dabb843c6d4f7f866b4a2456073c9eaf4c77 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 14:12:28 2018 +0300 Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes. commit ad7a78b253be970db70c2251e66f9297d8e7f829 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:46:30 2018 +0300 Added comment commit 0276ea51875bab37be01a4dc5e5a047c5698c571 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:42:43 2018 +0300 Added type cast commit c63fc5d5f19c58498108d1698055b2b442227eb3 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:36:51 2018 +0300 Moved static class members initialization into the proper place. commit b945548e9306b1826c881918858b5e5aa3eb3002 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:21:03 2018 +0300 Removed redundand assertion commit d5a41088401814c829847db212488f8aae39bcd2 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:19:13 2018 +0300 Removed duplicate code commit 8dadca8864e66de70a24bdf1181bcf7dd8fb27d7 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 11:05:43 2018 +0300 Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros. commit 9ef07c88bd76801e2d4fbfeab3ebfd6e6a67ac5f Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 10:48:29 2018 +0300 typo commit a06f0f3d3aba53e766046221ee44fb9720389ecc Merge: 94099586ec 3412345ffe Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Oct 17 10:47:07 2018 +0300 Merge branch 'master' into immutable * master: Remove unused variable makefile_am_files Classify object handlers are required/optional Add support for getting SKIP_TAGSTART and SKIP_WHITE options Remove some obsolete config_vars.mk occurrences Remove bsd_converted from .gitignore Remove configuration parser and scanners ignores Remove obsolete buildconf.stamp from .gitignore [ci skip] Add magicdata.patch exception to .gitignore Remove outdated ext/spl/examples items from .gitignore Remove unused test.inc in ext/iconv/tests commit 94099586ec599117581ca01c15b1f6c5f749e23a Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Oct 15 23:34:01 2018 +0300 Immutable clases and op_arrays
* | | Avoid useless store and checks in xlat_table.Dmitry Stogov2018-09-261-9/+48
| | |
* | | Remove AC_HEADER_DIRENTPeter Kokot2018-09-041-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autoconf 2.59d (released in 2006) [1] started promoting several macros as not relevant for newer systems anymore, including the `AC_HEADER_DIRENT`. This macro checks which header defines the `DIR` type. If `<dirent.h>` is available it defines the `HAVE_DIRENT_H` symbol. Since the `<dirent.h>` header is already checked in the `configure.ac`, this check is not needed anymore. This macro also additionally checks for SCO Xenix (discontinued, latest release 1989) dir and x libraries. [2] Commit 6ed790685f9ddae11834f36b0ba4fea58afc805a introduced also `<sys/dir.h>`. This header exists from times of UNIX System V and provided definition of DIR type on these systems such as 4.3BSD. Today `<sys/dir.h>` is kept for backwards compatibility and includes the `<dirent.h>` on current systems. With `dirent.h>` present this include is no longer required. Refs: [1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS [2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html Remove unused dirent.h includes
* | year++Xinchen Hui2018-01-021-1/+1
| |
* | Reduce number of hash collisions during dulicate address detection.Dmitry Stogov2017-12-111-4/+13
|/
* We don't have to use "persistent" heap with PHP-7 HashTable(s).Dmitry Stogov2017-06-291-8/+2
|
* Remove superfluous semicolonsTom Van Looy2017-06-261-3/+3
|
* Clear alocated memory blocks, only if this is really necessary.Dmitry Stogov2017-06-211-1/+1
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Merge branch 'PHP-7.0'Xinchen Hui2016-06-241-1/+1
|\ | | | | | | | | | | | | | | * PHP-7.0: Fixed format Conflicts: ext/opcache/zend_shared_alloc.c
| * Fixed formatXinchen Hui2016-06-241-1/+1
| |
* | Added ZEND_ATTRIBUTE_FORMAT to some middind functions.Dmitry Stogov2016-06-211-2/+2
|/ | | | | "%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
* make opcache lockfile path configurableFatih ACAR2016-04-061-4/+7
| | | | | | Signed-off-by: William Dauchy <william@gandi.net> Signed-off-by: Baptiste Daroussin <baptiste.daroussin@gandi.net> Signed-off-by: Fatih Acar <fatih.acar@gandi.net>
* Fixed another segfault with file_cache_only nowXinchen Hui2016-03-011-0/+4
|
* Fixed segfault with file_cache_onlyXinchen Hui2016-02-281-0/+4
|
* Fixed possible crash at PCRE on MSHUTDOWNDmitry Stogov2016-02-241-0/+13
|
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * Fixed bug #68677 (Use After Free in OPcache)Xinchen Hui2015-04-011-1/+1
| | | | | | | | (cherry picked from commit 777c39f4042327eac4b63c7ee87dc1c7a09a3115)
| * Bump yearXinchen Hui2015-01-151-1/+1
| |
| * Bump yearXinchen Hui2014-01-031-1/+1
| |
* | Implemented file_cache_fallback mechanismAnatol Belski2015-10-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | which is essential as an attempt to fix the "failed to reattach" error on Windows. If file_cache is enabled, Opcache will automaticaly switch to file_cache_only mode in the case a process failed to map the shared segment at the required address. The important small part of the SHM will still be mapped, which allows information exchange between normal processes using SHM and those using the fallback mechanism. This is based on Dmitry's, Matt's and mine ideas. So many thanks for support!
* | Ensure proper data alignmentDmitry Stogov2015-08-311-0/+1
| |
* | Use better zend_hash_* functionsDmitry Stogov2015-06-051-1/+1
| |
* | Added experimental (disabled by default) file based opcode cache.Dmitry Stogov2015-05-061-17/+23
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | Fixed #68677Xinchen Hui2015-01-081-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-8/+6
| |
* | bring back all the TSRMLS_FETCH() stuffAnatol Belski2014-10-151-0/+3
| | | | | | | | for better comparability with the mainstream
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-10-101-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (40 commits) int to size_t where the underlaying API supports it use php_socket_t instead of int fix signed/unsigned mismatch warning fix compilation warning Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference. Add notes about get_class_entry/get_class_name to UPGRADING Fix casts in GD Drop redundant casting code from ext/filter update NEWS update NEWS update NEWS update NEWS Added note to UPGRADING regarding 64-bit support in pack()/unpack() pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG Add 64 bit formats to pack() and unpack() Help to CPU branch predictor Removed unused EG(orig_error_reporting) Update get_class_name semantics Remove Z_OBJ_CLASS_NAME_P Improved VM stack primitives for fast paths. Slow paths are not inlined anymore. ...
| * | Copy all the arena allocated data from SHM to process memory at onceDmitry Stogov2014-10-091-1/+1
| | |
* | | cleanup TSRMLS_FETCH in ext/opcacheAnatol Belski2014-09-261-3/+0
|/ /
* | master renames phase 1Anatol Belski2014-08-251-5/+5
| |