File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -8269,6 +8269,14 @@ static int zend_jit_restart_hot_trace_counters(zend_op_array *op_array)
8269
8269
return SUCCESS ;
8270
8270
}
8271
8271
8272
+ static int16_t * zend_jit_hot_counter_allocate (void )
8273
+ {
8274
+ int16_t * counter =
8275
+ & zend_jit_hot_counters [ZEND_JIT_COUNTER_NUM ];
8276
+ ZEND_JIT_COUNTER_NUM = (ZEND_JIT_COUNTER_NUM + 1 ) % ZEND_HOT_COUNTERS_COUNT ;
8277
+ return counter ;
8278
+ }
8279
+
8272
8280
static int zend_jit_setup_hot_trace_counters (zend_op_array * op_array )
8273
8281
{
8274
8282
zend_op * opline ;
@@ -8313,8 +8321,7 @@ static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array)
8313
8321
opline -> handler = (const void * )zend_jit_loop_trace_counter_handler ;
8314
8322
if (!trace_info -> counter ) {
8315
8323
trace_info -> counter =
8316
- & zend_jit_hot_counters [ZEND_JIT_COUNTER_NUM ];
8317
- ZEND_JIT_COUNTER_NUM = (ZEND_JIT_COUNTER_NUM + 1 ) % ZEND_HOT_COUNTERS_COUNT ;
8324
+ zend_jit_hot_counter_allocate ();
8318
8325
}
8319
8326
trace_info -> trace_flags |=
8320
8327
ZEND_JIT_TRACE_START_LOOP ;
@@ -8338,8 +8345,7 @@ static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array)
8338
8345
/* function entry */
8339
8346
opline -> handler = (const void * )zend_jit_func_trace_counter_handler ;
8340
8347
trace_info -> counter =
8341
- & zend_jit_hot_counters [ZEND_JIT_COUNTER_NUM ];
8342
- ZEND_JIT_COUNTER_NUM = (ZEND_JIT_COUNTER_NUM + 1 ) % ZEND_HOT_COUNTERS_COUNT ;
8348
+ zend_jit_hot_counter_allocate ();
8343
8349
trace_info -> trace_flags |=
8344
8350
ZEND_JIT_TRACE_START_ENTER ;
8345
8351
}
You can’t perform that action at this time.
0 commit comments