php-src/main
Bob Weinand 6a2c5318f9
Optimize observers (#13649)
Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocate a call frame and push the arguments, to call the the function afterwards.
Doing so is still a performance benefit as opposed to executing individual INIT_FCALL+SEND_VAL ops. Thus, even if the frameless call turns out to be observed, the call overhead is slightly lower than before.
If the internal function is not observed at all, the unavoidable overhead is fetching the FLF zend_function pointer and the run-time cache needs to be inspected.

As part of this work, it turned out to be most viable to put the result operand on the ZEND_OP_DATA instead of ZEND_FRAMELESS_ICALL_3, allowing seamless interoperability with the DO_ICALL opcode.
This is a bit unusual in comparison to all other ZEND_OP_DATA usages, but seems to not pose problems overall.

There is also a small issue resolved: trampolines would always use the ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER function due to zend_observer_fcall_op_array_extension being set to -1 too late.
2024-06-15 14:42:27 +02:00
..
streams Merge branch 'PHP-8.3' 2024-06-13 14:04:48 +01:00
build-defs.h.in Remove remainings of recent oci extensions removal (#13352) 2024-02-08 18:04:00 +01:00
debug_gdb_scripts.c Inline GDB scripts in the PHP binary (#13600) 2024-04-16 15:10:01 +02:00
explicit_bzero.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
fastcgi.c Merge branch 'PHP-8.3' 2024-05-19 22:57:08 +02:00
fastcgi.h Mark various functions with void arguments. 2021-05-12 14:55:53 +01:00
fopen_wrappers.c Sync #if/ifdef/defined (#14508) 2024-06-09 14:23:41 +02:00
fopen_wrappers.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
getopt.c Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
http_status_codes.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
internal_functions.c.in Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
main_arginfo.h Add PHP_SBINDIR (#13363) 2024-05-29 07:04:05 +02:00
main.c Optimize observers (#13649) 2024-06-15 14:42:27 +02:00
main.stub.php Add PHP_SBINDIR (#13363) 2024-05-29 07:04:05 +02:00
network.c Sync #if/ifdef/defined (#14508) 2024-06-09 14:23:41 +02:00
output.c Revert php_output_stack_* signature change 2024-04-19 13:44:21 +01:00
php_compat.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_content_types.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_content_types.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_getopt.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_globals.h Fix open_basedir leak 2023-07-25 17:54:14 +02:00
php_ini_builder.c sapi/*: move duplicate "--define" code to library 2022-04-18 16:52:08 +02:00
php_ini_builder.h sapi/*: move duplicate "--define" code to library 2022-04-18 16:52:08 +02:00
php_ini.c Sync #if/ifdef/defined (#14508) 2024-06-09 14:23:41 +02:00
php_ini.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_main.h Fix missing syntax error message in cli-server router script 2024-02-07 16:13:08 +01:00
php_memory_streams.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_network.h Remove inet_aton 2024-02-23 23:16:43 +01:00
php_odbc_utils.c [skip ci] Fix typo (#11558) 2023-06-30 12:59:33 +02:00
php_odbc_utils.h Quote when adding to connection string in (PDO_)ODBC 2022-05-27 16:56:44 +02:00
php_open_temporary_file.c Improve randomness of uploaded file names and files created by tempnam() 2024-06-10 15:37:51 +02:00
php_open_temporary_file.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_output.h main/output.c: Refine int return type to bool or zend_result (#13997) 2024-04-19 10:46:40 +01:00
php_reentrancy.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_scandir.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_scandir.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_streams.h Fix stream fclose_stdiocast_flush_in_progress type 2023-11-22 20:39:30 -06:00
php_syslog.c Make globals const (part 2) (#10610) 2023-02-18 19:52:53 +00:00
php_syslog.h Fix strict prototype for php_closelog 2022-06-19 22:56:44 +01:00
php_ticks.c Fix GH-10737: PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c 2023-04-08 16:34:07 +02:00
php_ticks.h Fix GH-10737: PHP 8.1.16 segfaults on line 597 of sapi/apache2handler/sapi_apache2.c 2023-04-08 16:34:07 +02:00
php_variables.c Mark multple functions as static (#13864) 2024-05-22 13:11:46 +02:00
php_variables.h Remove unused PARSE_SESSION and PARSE_REQUEST (#14081) 2024-04-30 16:39:00 +02:00
php_version.h PHP-8.2 is now for PHP 8.2.21-dev 2024-05-21 14:32:07 -04:00
php.h Sync #if/ifdef/defined (#14508) 2024-06-09 14:23:41 +02:00
reentrancy.c Remove unused includes of php_random.h (#13131) 2024-01-12 18:35:18 +01:00
rfc1867.c Merge branch 'PHP-8.3' 2024-06-10 23:03:49 +02:00
rfc1867.h Fix -Wenum-int-mismatch warnings on gcc 13 2023-04-20 16:04:59 +02:00
safe_bcmp.c Fix comment for php_safe_bcmp (#10306) 2023-01-12 23:30:36 +01:00
SAPI.c Clean-up unused headers (#14365) 2024-06-01 17:12:42 +01:00
SAPI.h Add request_parse_body() function 2024-02-08 12:08:07 +01:00
snprintf.c [skip ci] Fix various typos and grammar issues (#11143) 2023-04-28 11:05:32 +02:00
snprintf.h Revert GH-10220 2023-01-16 12:27:33 +01:00
spprintf.c Introduce %S modifier and use it (#13168) 2024-01-16 22:51:02 +01:00
spprintf.h Revert GH-10220 2023-01-16 12:27:33 +01:00
strlcat.c strlcpy/strlcat update to last openbsd version. 2022-04-28 15:09:55 +02:00
strlcpy.c strlcpy/strlcat update to last openbsd version. 2022-04-28 15:09:55 +02:00