mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
[ci skip] [Zend] Update README.md with new Zend VM executors
Closes GH-8008 As a new learner to PHP Zend VM, the first place I can find information is this README.md. Unfortunately, it has not included the latest Zend VM kind and code generation script. With code reading and trail-and-error experiments, I found a few updates that might be helpful to new learners. ChangeLog: 1) Add HYBRID threading model 2) Remove --without-old-executor option and description 3) ZE2 --> ZE3 (Since PHP 7) 4) Change default VM kind from CALL to HYBRID Signed-off-by: Su, Tao <tao.su@intel.com>
This commit is contained in:
parent
74f7f2c4b1
commit
22688c7822
@ -119,21 +119,21 @@ ZEND_VM_HELPER_EX(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>, <PARAM_SPEC>)
|
||||
}
|
||||
```
|
||||
|
||||
Executor's code is generated by PHP script zend_vm_gen.php it uses
|
||||
The executors code is generated by the PHP script `zend_vm_gen.php`. It uses
|
||||
`zend_vm_def.h` and `zend_vm_execute.skl` as input and produces
|
||||
`zend_vm_opcodes.h` and `zend_vm_execute.h`. The first file is a list of opcode
|
||||
definitions. It is included from `zend_compile.h`. The second one is an executor
|
||||
code itself. It is included from `zend_execute.c`.
|
||||
|
||||
`zend_vm_gen.php` can produce different kind of executors. You can select
|
||||
different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO`. You
|
||||
can disable opcode specialization using `--without-specializer`. You can include
|
||||
or exclude old executor together with specialized one using
|
||||
`--without-old-executor`. At last you can debug executor using original
|
||||
`zend_vm_def.h` or generated file `zend_vm_execute.h`. Debugging with original
|
||||
file requires `--with-lines` option. By default ZE2 uses the following command
|
||||
to generate executor:
|
||||
`zend_vm_gen.php` can produce different kind of executors. You can select a
|
||||
different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO|HYBRID`.
|
||||
You can disable opcode specialization using `--without-specializer`.
|
||||
At last you can debug the executor using the original `zend_vm_def.h` or the
|
||||
generated `zend_vm_execute.h` file. Debugging with the original file requires
|
||||
the `--with-lines` option. By default ZE3 (since PHP 7) uses the following
|
||||
command to generate the executor:
|
||||
|
||||
```bash
|
||||
php zend_vm_gen.php --with-vm-kind=CALL
|
||||
# Default VM kind is HYBRID
|
||||
php zend_vm_gen.php --with-vm-kind=HYBRID
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user