com php-src: Always record ZEND_JIT_TRACE_START and Z END_JIT_TRACE_END: ext/opcache/jit/zend_jit_vm_ helpers.c
| From: | Dmitry Stogov | Date: | Tue, 28 Jul 2020 00:23:28 +0000 |
| Subject: | com php-src: Always record ZEND_JIT_TRACE_START and Z END_JIT_TRACE_END: ext/opcache/jit/zend_jit_vm_ helpers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112397@lists.php.net to get a copy of this message | ||
Commit: fd56fd2279361384b5ba3688efa30d825886d881
Author: Dmitry Stogov <dmitry@zend.com> Tue, 28 Jul 2020 03:23:28 +0300
Parents: 226617d35804464cda33a1adf0424327da0cde42
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fd56fd2279361384b5ba3688efa30d825886d881
Log:
Always record ZEND_JIT_TRACE_START and ZEND_JIT_TRACE_END
Changed paths:
M ext/opcache/jit/zend_jit_vm_helpers.c
Diff:
diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c
index 836629eb52..26e9b6f843 100644
--- a/ext/opcache/jit/zend_jit_vm_helpers.c
+++ b/ext/opcache/jit/zend_jit_vm_helpers.c
@@ -594,15 +594,6 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
#endif
zend_execute_data *prev_call = EX(call);
- if (UNEXPECTED(opline->opcode == ZEND_HANDLE_EXCEPTION)) {
- /* Abort trace because of exception */
-#ifdef HAVE_GCC_GLOBAL_REGS
- execute_data = save_execute_data;
- opline = save_opline;
-#endif
- return ZEND_JIT_TRACE_STOP_EXCEPTION;
- }
-
orig_opline = opline;
op_array = &EX(func)->op_array;
@@ -616,9 +607,20 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
TRACE_START(ZEND_JIT_TRACE_START, start, op_array, opline);
+ if (UNEXPECTED(opline->opcode == ZEND_HANDLE_EXCEPTION)) {
+ /* Abort trace because of exception */
+ TRACE_END(ZEND_JIT_TRACE_END, ZEND_JIT_TRACE_STOP_EXCEPTION, opline);
+#ifdef HAVE_GCC_GLOBAL_REGS
+ execute_data = save_execute_data;
+ opline = save_opline;
+#endif
+ return ZEND_JIT_TRACE_STOP_EXCEPTION;
+ }
+
if (prev_call) {
int ret = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx, is_megamorphic,
&megamorphic, ret_level + level);
if (ret < 0) {
+ TRACE_END(ZEND_JIT_TRACE_END, ZEND_JIT_TRACE_STOP_BAD_FUNC, opline);
#ifdef HAVE_GCC_GLOBAL_REGS
execute_data = save_execute_data;
opline = save_opline;