Xinchen Hui
fe0af271c6
Fixed bug #70843 (Segmentation fault on MacOSX with opcache.file_cache_only=1)
2015-11-04 18:59:30 +08:00
Xinchen Hui
1af0118ff8
Merge branch 'PHP-7.0'
2015-10-26 17:29:22 -07:00
Xinchen Hui
008d8b6789
Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use)
2015-10-26 17:28:19 -07:00
Xinchen Hui
31553f07f2
Revert "Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use)"
...
This reverts commit 3ef96c2cc6
.
2015-10-26 17:26:30 -07:00
Xinchen Hui
0771b46099
Merge branch 'PHP-7.0'
2015-10-26 17:11:16 -07:00
Dmitry Stogov
3e89c883bb
Changed ZEND_CLONE->extended_value meaning to relative offset (previously it was absolute opline number)
2015-10-30 14:53:53 +03:00
Dmitry Stogov
4d702c21d0
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Don't remap .text segment if huge pages are not available.
2015-10-29 08:45:22 +03:00
Julien Pauli
eb59dd7d81
Don't remap .text segment if huge pages are not available.
2015-10-29 08:44:19 +03:00
Dmitry Stogov
da8e6ec4a5
Fixed incorrect instruction cleanup
2015-10-28 23:10:33 +03:00
Dmitry Stogov
3b44e40277
fixed incorrect bitmask
2015-10-28 21:26:52 +03:00
Dmitry Stogov
eb7be5379d
Speed up fetching of class entries for self:: parent:: and static::
...
This is generalized solution for Bob's idea of speed up self::method() calls without ZEND_FETCH_CLASS.
At first, it adds few new opcodes to separate class related behaviour:
FETCH_STATIC_PROP_R
FETCH_STATIC_PROP_W
FETCH_STATIC_PROP_RW
FETCH_STATIC_PROP_FUNC_ARG
FETCH_STATIC_PROP_UNSET
FETCH_STATIC_PROP_IS
UNSET_STATIC_PROP
ISSET_ISEMPTY_STATIC_PROP
FETCH_CLASS_CONSTANT
At seconds, it enables IS_UNUSED operand to fetch (self, parent or static without separate FETCH_CLASS) for new opcodes and the following ones:
INIT_STATIC_METHOD_CALL
NEW
END_INSTANCEOF
Finaly, opcache optimizer had to be fixed to support new opcodes.
2015-10-28 21:26:52 +03:00
Xinchen Hui
3ef96c2cc6
Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use)
2015-10-26 17:09:42 -07:00
Anatol Belski
ccc95bf9df
backport 262160e
and 2d55e8c
into 5.6
2015-10-20 20:05:44 +02:00
Xinchen Hui
d4df6641c8
Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10)
2015-10-17 01:52:32 -07:00
Anatol Belski
ffb5d0aca3
Implemented file_cache_fallback mechanism
...
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!
2015-10-09 23:47:59 +02:00
Anatol Belski
a549a3ac17
improve error message
2015-10-04 16:36:53 +02:00
Anatol Belski
c97198e181
fix incrementing on 32-bit
2015-10-04 12:19:16 +02:00
Xinchen Hui
2fb8bb1157
Fixed bug #70632 (Third one of segfault in gc_remove_from_buffer)
2015-10-03 20:33:24 -07:00
Xinchen Hui
4744eec753
Fixed bug #70631 (Another Segfault in gc_remove_from_buffer())
2015-10-03 20:08:21 -07:00
Xinchen Hui
c147d90dbf
Fixed bug #70601 (Segfault in gc_remove_from_buffer())
2015-10-03 19:38:56 -07:00
Anatol Belski
4cb6342426
remove useless checks
...
Other platforms than listed in the checks are not supported since
PHP 5.5. We also won't need these checks for a while, so can simplify.
2015-10-03 10:57:32 +02:00
Anatol Belski
96fe3be7f2
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
fix win10 support
2015-10-03 10:46:10 +02:00
Anatol Belski
83bef0ef83
fix win10 support
...
dwMajorVersion == 10 there, and generally this check is obsolete
as we don't support dwMajorVersion < 6 since 5.5
2015-10-03 10:44:43 +02:00
Dmitry Stogov
a05fc48055
Extended zend_extension API to allow storing additional data associated with op_arrays in opcache SHM. (op_array->reserved[])
2015-09-25 11:50:38 +03:00
Anatol Belski
67aff16d94
fix ident
2015-09-25 08:30:44 +02:00
Anatol Belski
0fd7acd11d
don't keep locked mutex after errors
2015-09-24 16:34:44 +02:00
Anatol Belski
df832c966c
avoid dangling pointers
2015-09-24 16:33:58 +02:00
Anatol Belski
3ef3d80f25
move accel_shared_globals assignment into locked block
...
this might fix crashes under high concurrency
2015-09-24 16:33:57 +02:00
Dmitry Stogov
2d55e8c186
Fix (revert) loop exit condition
2015-09-24 11:19:26 +03:00
Dmitry Stogov
262160e0e9
Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
2015-09-24 10:48:34 +03:00
Dmitry Stogov
233c42ad59
Enabled placing PHP code segment into huge pages
2015-09-15 02:04:09 +03:00
Dmitry Stogov
818e5ea5f7
Enable file based cache compilation by default
2015-09-15 01:58:32 +03:00
Dmitry Stogov
c104d329e1
Use shorter php.ini directive name "opcache.huge_code_pages" and disable it by default.
2015-09-15 01:54:04 +03:00
Dmitry Stogov
f2480582fb
Removed useless include
2015-09-15 01:46:53 +03:00
Dmitry Stogov
5c28c21159
Use memcpy() instead of mmap() to keep modifyed code (e.g. gdb breakpoints)
2015-09-14 18:42:45 +03:00
Dmitry Stogov
669f0b39b1
Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages.
...
PHP should be configured and built with --enable-huge-code-pages, OS should be configured to provide huge pages.
It's possible to enable/disable this future in php.ini through opcache.enable_huge_code_pages=0/1.
The feature was tested on Linux and provided 2% improvement on real-life apps, because of 2-3 times reduction in number of iTLB misses.
2015-09-14 13:34:17 +03:00
Bob Weinand
fe08b933e4
Add support for **= in opcache optimizer
2015-09-13 12:35:35 +02:00
Anatol Belski
b9155b851e
add test for bug #70423
2015-09-07 17:31:49 +02:00
Anatol Belski
46792a9914
remove unnecessary check
...
as it's unrelated to the size pre calculation
2015-09-07 15:14:26 +02:00
Anatol Belski
eaf96698c7
Fix bug #70423 Warning Internal error: wrong size calculation
2015-09-07 15:02:33 +02:00
Dmitry Stogov
a2f8a7675b
Prevent HashTable compaction below HT_MIN_SIZE (this may lead to hash collisions).
2015-09-02 13:03:31 +03:00
Dmitry Stogov
d8eee72a84
Fixed possible caching with invalid key value
2015-09-01 12:56:33 +03:00
Dmitry Stogov
89aa1b7392
Ensure proper data alignment
2015-08-31 13:56:42 +03:00
Xinchen Hui
5a37056efa
unnecessary 1 byte allocted
2015-08-21 18:28:02 +08:00
Xinchen Hui
79cd9a18b5
Fixed bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled).
2015-08-11 21:01:56 +08:00
Xinchen Hui
6e894f8b81
Merge branch 'PHP-5.6'
2015-08-11 21:44:04 +08:00
Dmitry Stogov
18fb424bef
Fixed bug #70207 (Finally is broken with opcache)
2015-08-10 16:38:43 +03:00
Dmitry Stogov
90cb3bb7de
Reduce memory usage by using bitsets instead of array of bytes.
2015-08-06 15:41:50 +03:00
Dmitry Stogov
6d681876ee
Get rid of memcpy() in MAKE_NOP()
2015-08-06 15:40:40 +03:00
Bogdan Andone
68185bafbe
opcache: Patch SSE based fast_memcpy() implementation
...
Use _mm_store_si128() instead of _mm_stream_si128(). This ensures that copied memory
is preserved in data cache, which is good as the interpretor will start to use this
data without the need to go back to memory. _mm_stream* is intended to be used for
stores where we want to avoid reading data into the cache and the cache pollution;
in our scenario it seems that preserving the data in cache has a positive impact.
Tests on WordPress 4.1 show ~1% performance increase with fast_memcpy() in place
versus standard memcpy() when running php-cgi -T10000 wordpress/index.php.
I also updated SW prefetching on target memory but its contribution is almost negligible.
The address to be prefetched will be used in a couple of cycles (at the next iteration)
while the data from memory will be available in >100 cycles.
2015-07-29 14:51:57 +03:00
Nikita Popov
a717acd21a
Fix RECV_VARIADIC literal compacting wrt cache slot
2015-07-26 21:22:31 +02:00
Xinchen Hui
3e479ef424
Fixed bug #70111 (Segfault when a function uses both an explicit return type and an explicit cast)
2015-07-22 22:43:30 +08:00
Anatol Belski
a685953969
fix duplicated line
2015-07-17 20:30:21 +02:00
Anatol Belski
daba578dbe
fix file cache path calculation at all the places
...
moved the corresponding code into a separte function while on that
2015-07-17 15:14:25 +02:00
Anatol Belski
4c87750c26
fix path handling for the file cache
2015-07-17 13:51:16 +02:00
Xinchen Hui
32a4507abc
Fixed segfault if opcache is disabled and with file_cache
2015-07-15 10:38:23 +08:00
Xinchen Hui
453ec91dfe
Fixed bug #70067 (Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T)
2015-07-14 18:59:36 +08:00
Xinchen Hui
b8eff44b0e
Fixed Bug #70058 Build fails when building for i386
...
(I don't have a m32 build env, so this is not tested)
2015-07-13 15:05:04 +08:00
Dmitry Stogov
ef1b588f6a
Resolve GOTO at compile time and replace it with sequnce of FREE/FE_FREE and JMP.
2015-07-10 04:44:21 +03:00
Dmitry Stogov
549e8c4959
Squashed commit of the following:
...
commit 03cf871f1576f08b2348c141b209894a7bf17a86
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:31 2015 +0300
Revert "Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)"
This reverts commit 5ee8413259
.
commit 285a68227ce3d380e821a24fa389aa5239bd3fe1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:26 2015 +0300
Revert "Tuned off dubugging of live ranges"
This reverts commit 404dc93d35
.
commit 93d9d11157301ee2ec99afb6f5744b126d17f637
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:17 2015 +0300
Revert "Remove loop_var_stack"
This reverts commit b3a4c05071
.
commit ede68ebbc284aec79e3f719f2c8dbf9da6907752
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:12 2015 +0300
Revert "ZEND_SEPARATE reuses temporaries"
This reverts commit 1852f538b9
.
commit 96d8995dc1f517fb01b481736273767509f76c47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:10 2015 +0300
Revert "Add assertion in liveliness computation"
This reverts commit ed14019e8c
.
commit 0649d7bfef152e6cc8e67b922534e9946c634d9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:07 2015 +0300
Revert "Fixed invalid live-range detection"
This reverts commit 54f367ee2a
.
commit dfe8f3851f6b04595eb089323e3492115a59363e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:04 2015 +0300
Revert "Add test guaranteeing that loop vars are only freed after potential return type exceptions"
This reverts commit f5db5a558d
.
commit 52a94aad6f48a199358cc07f7e4f56bb73050504
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:01 2015 +0300
Revert "Fixed exception habdling on "return" statement."
This reverts commit 17c5315bdf
.
commit 6e90ad7331901711e89c2ceb2bcab5023e5cee60
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:58 2015 +0300
Revert "Fix too early terminated temporary range with break/cont/goto"
This reverts commit cc876c04b4
.
commit 7b766e44b1970e4031f75109c302c07ead2c05cb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:55 2015 +0300
Revert "Fixed exception catching on break/continue"
This reverts commit 8c3f701eeb
.
2015-07-10 03:31:52 +03:00
Dmitry Stogov
b77fa94cf9
Disable opcache.fast_shutdown if USE_ZEND_ALLOC=0
2015-07-09 12:19:51 +03:00
Xinchen Hui
249915f938
Add comment to explaining the new check
2015-07-08 17:44:54 +08:00
Xinchen Hui
c6037bd3af
Fixed bug #70012 (Exception lost with nested finally block)
2015-07-08 17:15:09 +08:00
Dmitry Stogov
5ee8413259
Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)
...
Squashed commit of the following:
commit 38e22106d4
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:12:19 2015 +0300
Added NEWS entry
commit 0a355935bf
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:06:32 2015 +0300
Inline function, to eliminate repeatable checks
commit d937584f3a
Merge: 0341626
32677f5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 14:35:49 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
Fix x86 build
Fixed use after free on closure_call_leak_with_exception.phpt
Fixed test
commit 0341626ea9
Merge: 74869fa
dec35de
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 12:00:53 2015 +0300
Merge branch 'temporary_cleaning' of https://github.com/laruence/php-src into temporary_cleaning
* 'temporary_cleaning' of https://github.com/laruence/php-src :
Fixed checkpoint get
Fixed crash of invalid pointer derefer
cleanup
commit 74869fa673
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 11:45:34 2015 +0300
Fixed wrong GOTO resolution
commit dec35ded32
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 15:58:49 2015 +0800
Fixed checkpoint get
commit b0f419540a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:47:11 2015 +0300
Fixed crash of invalid pointer derefer (laruence)
commit 7a428d98ca
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:35:47 2015 +0300
Fixed identation
commit 9c3a4dce9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:33:52 2015 +0300
Fixed invalid size
commit 653abc670b
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:29:14 2015 +0800
Fixed crash of invalid pointer derefer
commit e04500ceda
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:28:26 2015 +0800
cleanup
commit 34183e1687
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:49:46 2015 +0300
op_array->T_liveliness compression
commit 2f6ad84579
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:44:44 2015 +0300
White spaces
commit be83f115a3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:42:26 2015 +0300
Identation
commit 1f5084b990
Merge: 91b620d
1adf3df
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:41:54 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Throw TypeError for invalid callback
Fix crash when exception occurs during nested rope
Fix crash when exception is thrown during ROPE_END
Small cleanup in ternary compilation
move the define to the right place
fix ext/ldap build
Rectify information about invalid shift warning being now ArithmeticError
commit 91b620d684
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:32:04 2015 +0300
Replace GOTO by FREE/FE_FREE and JMP at compile time
commit 7052e56979
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 02:25:08 2015 +0300
Use zend_regenerate_var_liveliness_info() to regenerate information after pass two.
commit ae72b0dc67
Merge: a81c4bb
a919fe8
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 21:02:34 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Do not display EXT_TYPE_UNUSED in phpdbg opcodes
Run debug build with opcache on travis
commit a81c4bb8c6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 20:59:34 2015 +0300
Improved algorithm. It's actually the same algorithm with second loop removed and simpler temporary data structures. The only difference may be in "re-defined" vatriable handling. Now live-range in that case started from the seconnd definition (this must be more safe).
commit 9a16810f7a
Merge: bbfbe47
001ecd3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:57:45 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Simplify TMP var number decoding (without HashTable)
commit bbfbe470c8
Merge: 0bda4ab
436b01e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:02:01 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Avoid dangerous optimization
Fixed JMPZNZ instruction printing
Attempt at falling back on ldap_find_control for Mac OS
commit 0bda4abea7
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 16:05:33 2015 +0300
Fixed live-range construction for OP_DATA opcode
Added comments about algorithm assumtions
commit 521ad9df98
Merge: 4398dab
a09dcb0
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 14:54:15 2015 +0200
Merge branch 'master' of https://github.com/php/php-src into temporary_cleaning
commit 4398dab82f
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 13:51:27 2015 +0200
Add a few phpt tests related to temporary cleaning
commit 739656f83f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 14:28:49 2015 +0300
Fixed Zend/tests/foreach_004.phpt failure (FE_FETCH shouldn't be included into TMP vatriablr live range)
commit 3df462a2bc
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:41:02 2015 +0300
Improve data layout (reduce the op_array structure size on 64-bit systems)
commit 883b73c56e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:28:45 2015 +0300
Removed op_array->brk_cont_array
commit ae5e58b598
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:22:58 2015 +0200
Fix bug with brk_cont variable free / free loop vars via temporary liveliness info
commit b4223ca627
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:07:07 2015 +0200
Fix bugs / cleanup fixes
commit ea33189d22
Author: Xinchen Hui <laruence@gmail.com>
Date: Sun Jul 5 20:58:38 2015 +0800
Removed useless TsTop
commit 1dbb007e4a
Merge: 550bbf8
3a8af24
Author: Xinchen Hui <laruence@gmail.com>
Date: Sat Jul 4 15:06:44 2015 +0800
Merge branch 'temporary_cleaning' of https://github.com/dstogov/php-src into temporary_cleaning
commit 3a8af24529
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 16:15:36 2015 +0300
More exceptions from regular liveliness analyses (with explanation in comments).
Mark old "unexplained" exceptions with ???.
commit ba721efa2c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 14:16:09 2015 +0300
Print list of live temp variables (at least for internal debugging)
commit 8d1f88fe91
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 13:31:56 2015 +0300
Use op_array->T_liveliness to free incomplete ropes and restore error_reporting level on exception
commit 80c1d0d779
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 11:05:39 2015 +0300
Don't keep empty T_liveliness
commit 501ae8aaac
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:31:48 2015 +0300
Reverted changes to Zend/zend_arena.h.
Reuse CG(arena) instead of creating a new one.
commit a4fce36907
Merge: 6ff7246
fd0fcce
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:01:42 2015 +0300
Merge branch 'temporary_cleaning' of github.com:bwoebi/php-src into temporary_cleaning
* 'temporary_cleaning' of github.com:bwoebi/php-src:
Fix remaining issues with compacted temporaries
Fix regression from last commit (+1 ?!)
Fix off-by-one (opcache may remove last ZEND_RETURN)
Speed algorithm up, more fail safety when reusing temporaries
Dumb bug in opcode.c (forgot to update Ts[i])
Fix opcache support
Exempt ROPE temporaries from freeing
Hmm, we need temporary info for all the opcodes
Add opcache support for cleaning in optimization step (Opcache seems to have a few unrelated issues which blow up together with that patch)
Add proper temporary cleaning upon frame abortion
Fix arena on small sizes (size < sizeof(zend_arena))
commit fd0fcce811
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jul 2 20:00:33 2015 +0200
Fix remaining issues with compacted temporaries
commit 427dc58bbb
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:49:12 2015 +0200
Fix regression from last commit (+1 ?!)
commit 1adcf56a6e
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:17:07 2015 +0200
Fix off-by-one (opcache may remove last ZEND_RETURN)
commit 25b231b784
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 20:59:24 2015 +0200
Speed algorithm up, more fail safety when reusing temporaries
commit 22d9d05350
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 16:48:46 2015 +0200
Dumb bug in opcode.c (forgot to update Ts[i])
commit 6538269bfa
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 13:05:52 2015 +0200
Fix opcache support
commit 333a7c4a88
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Sat Jun 27 22:40:21 2015 +0200
Exempt ROPE temporaries from freeing
commit 02585f7708
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 16:20:55 2015 +0200
Hmm, we need temporary info for all the opcodes
commit cbcaedbd78
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:04:09 2015 +0200
Add opcache support for cleaning in optimization step
(Opcache seems to have a few unrelated issues which blow up together with that patch)
commit fef649f406
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:02:27 2015 +0200
Add proper temporary cleaning upon frame abortion
commit 1cec2e7271
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jun 25 23:33:21 2015 +0200
Fix arena on small sizes (size < sizeof(zend_arena))
2015-07-07 15:41:12 +03:00
Dmitry Stogov
436b01e379
Avoid dangerous optimization
2015-07-06 16:52:38 +03:00
Dmitry Stogov
fa1abb5677
Fixed memory leak because of incorrect 'if ();' optimization
2015-07-02 02:00:34 +03:00
Dmitry Stogov
a0b55e6a37
Cleanup (updated comments about optimization of comparison with IS_NULL)
2015-07-01 16:31:20 +03:00
Dmitry Stogov
e2baf737ae
Cleanup (we don't use is_ref=1/refcount=2 trick to trigger COW in PHP-7)
2015-07-01 16:15:45 +03:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Dmitry Stogov
dc588997e2
On Windows PHP may be restarted with different set of DSO extensions without SHM reset.
...
This may make optimisation for entities from DSO extensions inconsistent.
2015-06-29 18:01:01 +03:00
Dmitry Stogov
ee1e67fae6
On Windows PHP may be restarted with different set of DSO extensions without SHM reset.
...
This may make optimisation for entities from DSO extensions inconsistent.
2015-06-29 17:45:56 +03:00
Dmitry Stogov
4bd22cf1c1
Improved zend_string API (Francois Laupretre)
...
Squashed commit of the following:
commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
625dba022c
Don't evaluate invalid constant expressions.
2015-06-29 11:35:12 +03:00
Bob Weinand
4a4529adb0
Fix rope memory leaks upon exception
2015-06-28 15:42:15 +02:00
Anatol Belski
658d698a1c
add test for bug #69838
2015-06-20 09:35:02 +02:00
Anatol Belski
f88aad418e
Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
...
This chunk is pre calculated with aligned size, so should it use it
at run time.
2015-06-20 09:35:01 +02:00
Anatol Belski
269acaa363
Merge branch 'pull-request/1284'
...
* pull-request/1284:
Rename interface macros
Fix typo in UPGRADING
Move definition of Throwable to zend_exceptions.h/c
Check for zend_ce_throwable instead
Fix some missed tests
Add Throwable tests
Fix previous exception type check
Updated UPGRADING with RFC link
Changed AssertionException to AssertionError
Update exception error messages
Throwable method signatures.
Update exception names in tests after formatting changes.
Merge exception formatting changes.
Make zend_get_exception_base static.
Fix a few missed tests.
Fix handler double copy.
Updated tests to reflect exception class changes.
Remodel exceptions based on Throwable interface
2015-06-17 21:55:03 +02:00
Xinchen Hui
e011e6fdf4
Add a comment
2015-06-17 17:33:55 +08:00
Dmitry Stogov
a524a375d9
Improved class type hints checks, by caching resolved class entries in run-time cache.
2015-06-17 12:07:43 +03:00
Aaron Piotrowski
77cf6d81b4
Fix some missed tests
2015-06-15 08:20:30 -05:00
Bob Weinand
6e3e1e31e9
Add phpdbg to allowed cli-SAPIs in opcache
2015-06-15 12:31:46 +02:00
Dmitry Stogov
0a21a0c752
Removed opcache.load_comments configuration directive. Now doc comments loading costs nothing and always enabled.
2015-06-15 13:18:52 +03:00
Bob Weinand
7c2a0157c7
Cache the class_name typehint key in arg_info
...
This leads to up to 2% improvement on one tested real world application by not having to always recalculate the lowercased string and its hash
2015-06-12 17:26:53 +02:00
Dmitry Stogov
869f662cdd
Use better zend_hash_* functions
2015-06-05 13:54:57 +03:00
Anatol Belski
cfadcfc734
cleanup more redundant S_IS* declarations
2015-05-25 18:03:26 +02:00
Nikita Popov
8542befa7b
Remove ZEND_BRK/ZEND_CONT from VM
...
These are no longer used at run-time now, only temporarily during
compilation.
2015-05-23 10:51:33 +02:00
Nikita Popov
9325ada725
Embed break/continue depth into opline
...
Previously a separate lval literal was used - this is probably a
leftover from the time where the break level could still be
specified dynamically.
2015-05-23 10:51:33 +02:00
Xinchen Hui
50688e3984
Forgot the test for bug #69688
2015-05-22 11:50:55 +08:00
Xinchen Hui
95da6b76f3
Fixed test
2015-05-22 11:49:15 +08:00
Xinchen Hui
8c0ba65d6a
Fixed bug #69688 (segfault with eval and opcache fast shutdown)
2015-05-22 11:48:13 +08:00
Dmitry Stogov
f186d4b8b1
Fixed build with DEBUG_COMPACT_LITERALS=1
2015-05-21 17:57:06 +03:00
Dmitry Stogov
0da206e4b7
Set proper type_info flags.
2015-05-21 00:51:34 +03:00
Dmitry Stogov
cf6ac5c665
Fixed SHM+FILE cache with opcache.protect_memory=1
2015-05-20 23:33:55 +03:00
Dmitry Stogov
5ff5201543
Improved script copyining from SHM to process memory
2015-05-20 23:12:04 +03:00
Dmitry Stogov
6c8d49b6b0
Improved hash table copying
2015-05-19 13:22:58 +03:00
Dmitry Stogov
d72a94468e
Merged FE_FETCH_R[W] with the following ASSIGN[_REF] when assigne to CV.
2015-05-13 12:55:42 +03:00
Dmitry Stogov
7e5aa6b2ea
Removed deprecated conditions
2015-05-13 10:09:06 +03:00
Dmitry Stogov
06ef3aa6b0
Fixed string handling (string cached in SHM marked as permanent, strings stored in CG(arena) as not)
...
Fixed anonymous class support
2015-05-12 13:45:52 +03:00
Dmitry Stogov
e6976e9ba2
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF)
2015-05-07 12:17:55 +03:00
Dmitry Stogov
329513c3a7
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF)
Conflicts:
NEWS
2015-05-07 12:16:40 +03:00
Dmitry Stogov
8026001943
Fixed bug #69549 (Memory leak with opcache.optimization_level=0xFFFFFFFF)
2015-05-07 12:14:14 +03:00
Dmitry Stogov
9e9170bd07
Strings and other pointers should be handled differently
2015-05-07 11:36:01 +03:00
Rasmus Lerdorf
dd0b602381
Fix build
2015-05-06 22:46:56 -07:00
Xinchen Hui
809616c9da
Temporary fix for SIGFPE
2015-05-07 11:25:04 +08:00
Dmitry Stogov
3abde43231
Added experimental (disabled by default) file based opcode cache.
2015-05-06 23:46:49 +03:00
Xinchen Hui
24992a1422
Merge branch 'PHP-5.5' into PHP-5.6
2015-05-05 11:06:14 +08:00
Xinchen Hui
cf3e976c3b
Update version
2015-05-05 11:06:04 +08:00
Dmitry Stogov
5af7743cf5
Merge branch 'anon'
...
* anon:
Pass class_entry through IS_VAR to avoid hash lookup in ZEND_NEW.
Use "safe" anonymous class names. Don't show the mangled names through var_dump().
Refactored using specialized opcodes
Fix implementing_class handling
More cleanup (mainly retab)
Don't issue FETCH_CLASS for anon classes
More retab
Simply anon class name generation
Retab
Revert unrelated changes / rebase fixup
Rebase Joe's anon classes implementation
2015-04-27 17:18:35 +03:00
Dmitry Stogov
ffe804a50c
Use new hash iteration API.
2015-04-27 16:50:47 +03:00
Dmitry Stogov
94245bc14c
Refactored using specialized opcodes
2015-04-27 12:24:39 +03:00
Dmitry Stogov
6265687768
Added HashTable flag HASH_FLAG_STATIC_KEYS that is maintaned to be set if all hash table keys are numbers or interned strings.
...
Take this flag into account when copy or destroy HashTable to avoud useless checks for each key.
2015-04-24 09:34:50 +03:00
Xinchen Hui
9db4e25927
Since 5.6 stat.cwd using emalloc (Thanks to Remi)
2015-04-22 15:14:00 +08:00
Dmitry Stogov
770cb1da71
Keep realpath and PCRE caches in consistency with opcache SHM.
2015-04-22 02:29:06 +03:00
Dmitry Stogov
a0c07c90f2
Fixed zend_string related inconsistencies
2015-04-21 23:26:34 +03:00
Dmitry Stogov
ca76a86fe6
Removed deprecated code
2015-04-21 11:48:43 +03:00
Dmitry Stogov
81a9505742
Compact HashTables to reduce SHM usage
2015-04-21 00:27:21 +03:00
Dmitry Stogov
b1a03d7d39
Removed invalid code
2015-04-20 16:48:49 +03:00
Xinchen Hui
5255ea42b5
What should we version the bundled opcache?
2015-04-14 16:20:01 +08:00
Dmitry Stogov
52eac6bf11
Improved "fust shutdown".
2015-04-03 10:48:55 +03:00
Xinchen Hui
ed43b7a548
Merge branch 'PHP-5.6'
...
Conflicts:
ext/opcache/zend_accelerator_module.c
2015-04-02 00:04:30 +08:00
Xinchen Hui
2533fde199
Merge branch 'PHP-5.5' into PHP-5.6
2015-04-01 23:59:45 +08:00
Danack
86f983bd3e
Fixed bug #69281 (opcache_is_script_cached no longer works)
2015-04-01 23:58:22 +08:00
Lior Kaplan
c22543b3f3
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Fixed bug #68739 (Missing break / control flow in curl)
Fixed bug #68740 (NULL Pointer Dereference)
Fixed bug #68677 (Use After Free in OPcache)
2015-04-01 01:54:53 +03:00
Xinchen Hui
0a8f28b432
Fixed bug #68677 (Use After Free in OPcache)
...
(cherry picked from commit 777c39f404
)
2015-04-01 01:24:16 +03:00
Xinchen Hui
5c31c8c6e5
Fixed is_callable/function_exists with disable_functions
2015-03-28 17:07:11 +08:00
Xinchen Hui
e60b380c55
Merge branch 'bug69315' of https://github.com/laruence/php-src
2015-03-28 14:10:41 +08:00
Kalle Sommer Nielsen
dd601e661c
Remove these CFLAGS for ereg in opcache, we don't use them anymore (as opcache uses PCRE) together with ereg being gone
2015-03-27 15:01:31 +01:00
Xinchen Hui
84d9426730
Fixed bug #69315
2015-03-27 17:50:36 +08:00
Kalle Sommer Nielsen
67b907f059
Change the error message for colliding class/interface/trait names to be a little more clearer.
...
C:\> php -r "interface stdClass { }"
Error: Cannot declare interface stdClass, because the name is already in use in Command Line Code on line 1
2015-03-26 01:44:23 +01:00
Xinchen Hui
6aaee5fc14
Merge branch 'PHP-5.6'
...
Conflicts:
ext/opcache/Optimizer/pass1_5.c
2015-03-25 23:35:56 +08:00
Xinchen Hui
d380d1cb1b
Fixed Bug #69297 (function_exists strange behavior with OPCache on disabled function)
...
is_callable returns true for disable_functions, but function_exists
return false for it.
2015-03-25 23:34:02 +08:00
Xinchen Hui
e46e9a3d22
Fixed Bug #69297 (function_exists strange behavior with OPCache on disabled function)
...
is_callable returns true for disable_functions, but function_exists
return false for it.
2015-03-25 23:29:18 +08:00
Kalle Sommer Nielsen
927d53fda4
Change "Cannot redeclare class X" into "Cannot redeclare class/interface/trait X", meaning that the following:
...
C:\> php -r "trait A { } trait A { }"
Will now properly print "Cannot redeclare trait A" instead of "Cannot redeclare class A" to make error messages a tiny bit clearer. Admittedly, a better solution can most likely be made by actually telling what the colliding object is a type of.
Internally this adds a new function:
zend_get_object_type()
2015-03-25 06:31:11 +01:00
Kalle Sommer Nielsen
a3d2f9b600
The error message is actually "Cannot", not "Can't"
2015-03-25 05:20:58 +01:00
Dmitry Stogov
e37e9d2986
Reverted part committed by mistake
2015-03-24 22:56:07 +03:00
Dmitry Stogov
23c33b1483
Optimized strings concatenation.
...
ZEND_ADD_STRING/VAR/CHAR are replaced with ZEND_ROPE_INTI, ZEND_ROPE_ADD, ZEND_ROPE_END.
Instead of reallocation and copying string on each ZEND_ADD_STRING/VAR/CAHR, collect all the strings and then allocate and construct the resulting string once.
2015-03-24 22:47:21 +03:00
Xinchen Hui
775a257cef
Only used in ZTS
2015-03-21 13:58:29 +08:00
Dmitry Stogov
0a6bb2dfd4
Fixed optimization patterns
2015-03-20 05:24:04 +03:00
Dmitry Stogov
d146d15003
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
2015-03-20 02:02:42 +03:00
Dmitry Stogov
d092cb6e8e
Second prefetch is useless, because cahce line on modern x86 CPUs is 64 bytes long.
2015-03-18 17:11:21 +03:00
Dmitry Stogov
db10b72523
Use fastcall calling convention for most critical ZE subsystems.
2015-03-13 21:10:09 +03:00
Dmitry Stogov
2b42d71908
Changed HashTable layout:
...
Removed HashTable->arHash (reduced memory consumption). Now hash slots may be accessed using HT_HASH() macro.
Hash slotas are allocated together with Buckets (before them) and lay in reverse order from HashTable->arData base address (see comments in Zend/zend_types.h)
Indexes in hash table and conflict resolution chains (Z_NEXT) may be stored as indeces or offsets in bytes, depending on system (32 or 64-bit).
HashTable data filelds are reordered to keep the most useful for zend_hash_find() data in the same CPU cache line.
2015-03-13 17:13:19 +03:00
Dmitry Stogov
6289f7e52f
Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details.
2015-03-12 20:39:04 +03:00
Dmitry Stogov
8633685675
Use specialized macro for string zval creation
2015-03-12 16:53:51 +03:00
Dmitry Stogov
5d0bacfe67
Merge branch 'PHP-5.6'
...
* PHP-5.6:
We don't cache custom strems with callbacks anymore
Conflicts:
ext/opcache/ZendAccelerator.c
2015-03-10 19:32:38 +03:00
Dmitry Stogov
b52a2940af
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
We don't cache custom strems with callbacks anymore
2015-03-10 19:30:32 +03:00
Dmitry Stogov
c814b3294a
We don't cache custom strems with callbacks anymore
2015-03-10 19:25:30 +03:00
Dmitry Stogov
53d8e5fc63
Improved hash key manangement code
2015-03-06 16:26:40 +03:00
Dmitry Stogov
4bc7ee2eb7
Fixed conditions
2015-03-06 11:00:19 +03:00
Dmitry Stogov
8308e617f1
Revert "Fix logical-op-parentheses warning"
...
This reverts commit b7408234b9
.
2015-03-06 10:56:19 +03:00