From 256100a9b57113915c4ea7f203a9d094eaa129a0 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 18 May 2019 20:39:18 +0200 Subject: [PATCH] [ci skip] Join Zend engine docs-alike files to readme --- Zend/README.ZEND_MM | 27 --------- Zend/README.ZEND_VM | 102 -------------------------------- Zend/README.md | 139 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 129 deletions(-) delete mode 100644 Zend/README.ZEND_MM delete mode 100644 Zend/README.ZEND_VM create mode 100644 Zend/README.md diff --git a/Zend/README.ZEND_MM b/Zend/README.ZEND_MM deleted file mode 100644 index 017b937665e14..0000000000000 --- a/Zend/README.ZEND_MM +++ /dev/null @@ -1,27 +0,0 @@ -Zend Memory Manager -=================== - -General: --------- - -The goal of the new memory manager (available since PHP 5.2) is to reduce memory -allocation overhead and speedup memory management. - -Debugging: ----------- - -Normal: - - $ sapi/cli/php -r 'leak();' - -Zend MM disabled: - - $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();' - -Shared extensions: ------------------- - -Since PHP 5.3.11 it is possible to prevent shared extensions from unloading so -that valgrind can correctly track the memory leaks in shared extensions. For -this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then -DL_UNLOAD() is skipped during the shutdown of shared extensions. diff --git a/Zend/README.ZEND_VM b/Zend/README.ZEND_VM deleted file mode 100644 index b05b7ccc9af4b..0000000000000 --- a/Zend/README.ZEND_VM +++ /dev/null @@ -1,102 +0,0 @@ -ZEND_VM -======= - -ZEND_VM architecture allows specializing opcode handlers according to op_type -fields and using different execution methods (call threading, switch threading -and direct threading). As a result ZE2 got more than 20% speedup on raw PHP -code execution (with specialized executor and direct threading execution -method). As in most PHP applications raw execution speed isn't the limiting -factor but system calls and database calls are, your mileage with this patch -will vary. - -Most parts of the old zend_execute.c go into zend_vm_def.h. Here you can -find opcode handlers and helpers. The typical opcode handler template looks -like this: - -ZEND_VM_HANDLER(, , , ) -{ - -} - - is a opcode number (0, 1, ...) - is an opcode name (ZEN_NOP, ZEND_ADD, :) - & are masks for allowed operand op_types. Specializer -will generate code only for defined combination of types. You can use any -combination of the following op_types UNUSED, CONST, VAR, TMP and CV also -you can use ANY mask to disable specialization according operand's op_type. - is a handler's code itself. For most handlers it stills the -same as in old zend_execute.c, but now it uses macros to access opcode operands -and some internal executor data. - -You can see the conformity of new macros to old code in the following list: - -EXECUTE_DATA - execute_data -ZEND_VM_DISPATCH_TO_HANDLER() - return _helper(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) -ZEND_VM_DISPATCH_TO_HELPER() - return (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) -ZEND_VM_DISPATCH_TO_HELPER_EX(,,) - return (, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) -ZEND_VM_CONTINUE() - return 0 -ZEND_VM_NEXT_OPCODE() - NEXT_OPCODE() -ZEND_VM_SET_OPCODE( - SET_OPCODE( -ZEND_VM_INC_OPCODE() - INC_OPCOD() -ZEND_VM_RETURN_FROM_EXECUTE_LOOP() - RETURN_FROM_EXECUTE_LOOP() -ZEND_VM_C_LABEL(