Dmitry Stogov
63c4414940
Initialize ctx->optimization_level
2015-11-12 02:46:41 +03:00
Dmitry Stogov
09aa68b294
Break dependency between opcache and optimizer. Remove copatibility macros.
2015-11-12 02:02:24 +03:00
Dmitry Stogov
948b7f5421
Changed ZEND_FREE.op2.num and ZEND_FE_FREE.op2.num back to use live_range_offset (try_catch_offset does't work)
2015-11-11 11:12:44 +03:00
Dmitry Stogov
baf97b1fcc
We don't nees zend_op_array->brk_cont_array at run-time anymore.
...
Move zend_op_array->brk_cont_array into CG(context).brk_cont_array.
Use more compact zend_op_array->live_range instead of zend_op_array->brk_cont_array.
Semantic is kept unchanged.
2015-11-10 21:48:03 +03:00
Dmitry Stogov
86a96f2cf1
Changed meaning of "op2" for ZEND_FREE, ZEND_FE_FREE, ZEND_FAST_CALL, ZEND_FAST_RET.
...
Previously it was an instruction number.
Now it's an index in op_array->try_cacth_array[].
2015-11-10 19:13:54 +03:00
Nikita Popov
83b1679b6f
Merge branch 'PHP-7.0'
...
Conflicts:
ext/opcache/Optimizer/zend_optimizer.c
2015-11-07 17:50:39 +01:00
Nikita Popov
bc3512c1d6
Fix various update_opN_const issues
2015-11-07 17:45:26 +01:00
Nikita Popov
9da456655c
Refactor update_op2_const
...
Combines both switches into one, to avoid having to maintain the same
opcode list twice. This also makes most of the bugs fixed by the next
commit pretty obvious.
No functional change here.
2015-11-07 17:31:09 +01:00
Reeze Xia
568c81809a
Merge branch 'PHP-7.0'
...
* PHP-7.0:
C99 complain fix
Update NEWS
Fixed bug #70876 Segmentation fault when regenerating session id with strict mode
2015-11-07 22:17:10 +08:00
Reeze Xia
c524f43e4f
C99 complain fix
2015-11-07 22:15:19 +08:00
Nikita Popov
603c172269
Merge branch 'PHP-7.0'
...
Conflicts:
ext/opcache/Optimizer/zend_optimizer.c
2015-11-07 12:09:20 +01:00
Nikita Popov
99d818f1e9
Don't propagate into ops that error on non-string
...
To properly support this make update_opN_const fallible -- they
are not always called through replace_with_const.
2015-11-07 12:04:51 +01:00
Nikita Popov
00b37e718d
Strip leading backslash in update_opN_const
2015-11-07 12:04:51 +01:00
Nikita Popov
632bee4abb
Fix update_opX_const lowercasing
...
It was lowering in-place.
2015-11-07 12:04:51 +01:00
Xinchen Hui
5385478844
Merge branch 'PHP-7.0'
2015-11-04 19:01:31 +08:00
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
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
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