| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.
Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.
|
| |
|
|\
| |
| |
| |
| | |
* PHP-8.0:
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80839 (PHP problem with JIT)
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)
|
| |
| |
| |
| | |
for static Thread Local Storage)
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80786
|
| |
| |
| |
| |
| |
| |
| | |
Don't use r0 as temporary register in math_double_long if it is
already used for a memory result.
This was already done in one branch, but not the other.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)
|
| |
| |
| |
| | |
code involving bitshifts)
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)
|
| | |
|
| |
| |
| |
| |
| |
| | |
This reverts commit 1106ff9a0e420e043c2e56c8ca00db85f1b85ee6.
Looks like this sauses segfaults on MacOs ZTS with JIT.
|
| |
| |
| |
| |
| |
| | |
Tested with php-cgi and wordpress and 1255 for jit settings.
Closes GH-6659.
|
| |
| |
| |
| | |
argument/result type checks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid the overhead of a call and checking types
when the argument is definitely an array.
Avoid the overhead of gc when `__destruct` won't get called.
This seemed cheap enough to check for in the jit.
Because of https://wiki.php.net/rfc/restrict_globals_usage
we can be sure in the ZEND_COUNT handler that the array count does not have to
be recomputed in php 8.1.
The below example took 0.854 seconds before the optimization,
and 0.564 seconds after the optimization, giving the same result
```php
<?php
/** @jit */
function bench_count(int $n): int {
$total = 0;
$arr = [];
for ($i = 0; $i < $n; $i++) {
$arr[] = $i;
$total += count($arr);
}
return $total;
}
function main() {
$n = 1000;
$iterations = 50000;
$start = microtime(true);
$result = 0;
for ($i = 0; $i < $iterations; $i++) {
$result += bench_count($n);
}
$elapsed = microtime(true) - $start;
printf("Total for n=%d, iterations=%d = %d, elapsed=%.3f\n", $n, $iterations, $result, $elapsed);
}
main();
```
Before
```asm
mov $0x7feb8cf8a858, %r15
mov $ZEND_COUNT_SPEC_CV_UNUSED_HANDLER, %rax
call *%rax
```
After
```asm
mov 0x70(%r14), %rdi - Copy the count from the `zend_array*` pointer
mov %rdi, (%rax) - Store the count in the destination's value
mov $0x4, 0x8(%rax) - Store IS_LONG(4) in the destination's type
```
And add tracing jit support
Closes GH-5584
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed observer API and JIT compatibility
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-8.0:
Fix opcache phpize build on FreeBSD
Updated to version 2021.1 (2021a)
|
| |
| |
| |
| | |
Closes GH-6589.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)
|
| |
| |
| |
| | |
preloaded JITted code)
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Keep JIT region executable under ZTS
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When one thread tries to compile a script, another thread may
already be executing JITed code. In this case we can't make the
memory non-executable.
This violates the W^X principle, but doesn't seem to be avoidable
for ZTS builds for now. The same problem does not exist for NTS,
as it's a different process executing there, which has it's own
memory protection mapping.
Closes GH-6595.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Observe unused return values in JIT
|
| |
| |
| |
| |
| | |
Even if the return value is not used, it should still be available
to the observer.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Add guard if lvalue of assignment may be a reference, but wasn't a reference during recording
|
| |
| |
| |
| | |
during recording
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
"function" values
`opcache.jit` accepts `tracing` and `function` as aliases, but they were not mentioned in the start-up INI warning message.
This updates the error message to include all possible values.
Closes GH-6490.
|