93
93
* conditions wherever possible.
94
94
*/
95
95
96
+ static inline nruserfn_t * nr_php_get_wraprec_from_op_array_extension (const char * fn , zend_function * zf ) {
97
+ nruserfn_t * wraprec = (nruserfn_t * )ZEND_OP_ARRAY_EXTENSION (& zf -> op_array , NR_PHP_PROCESS_GLOBALS (op_array_extension_handle ));
98
+ nrl_verbosedebug (NRL_AGENT , "%s from %s, op_array_extension=%p, wraprec=%p, wraprec->pid=%d" , __func__ , fn , ZEND_OP_ARRAY_EXTENSION (& zf -> op_array , NR_PHP_PROCESS_GLOBALS (op_array_extension_handle )), wraprec , wraprec -> pid );
99
+ return wraprec ;
100
+ }
101
+
96
102
static void nr_php_show_exec_return (NR_EXECUTE_PROTO TSRMLS_DC );
97
103
static int nr_php_show_exec_indentation (TSRMLS_D );
98
104
static void nr_php_show_exec (NR_EXECUTE_PROTO TSRMLS_DC );
@@ -598,6 +604,7 @@ static void nr_php_show_exec(NR_EXECUTE_PROTO TSRMLS_DC) {
598
604
char argstr [NR_EXECUTE_DEBUG_STRBUFSZ ];
599
605
const char * filename = nr_php_op_array_file_name (NR_OP_ARRAY );
600
606
const char * function_name = nr_php_op_array_function_name (NR_OP_ARRAY );
607
+ nruserfn_t * wr = nr_php_get_wraprec_from_op_array_extension (__func__ , execute_data -> func );
601
608
602
609
argstr [0 ] = '\0' ;
603
610
@@ -621,7 +628,7 @@ static void nr_php_show_exec(NR_EXECUTE_PROTO TSRMLS_DC) {
621
628
#if ZEND_MODULE_API_NO < ZEND_7_4_X_API_NO
622
629
nr_php_op_array_get_wraprec (NR_OP_ARRAY TSRMLS_CC ) ? " *" : "" ,
623
630
#else
624
- nr_php_get_wraprec ( execute_data -> func ) ? " *" : "" ,
631
+ wr ? " *" : "" ,
625
632
#endif
626
633
NRP_FILENAME (filename ), NR_OP_ARRAY -> line_start );
627
634
} else if (NR_OP_ARRAY -> function_name ) {
@@ -642,7 +649,7 @@ static void nr_php_show_exec(NR_EXECUTE_PROTO TSRMLS_DC) {
642
649
#if ZEND_MODULE_API_NO < ZEND_7_4_X_API_NO
643
650
nr_php_op_array_get_wraprec (NR_OP_ARRAY TSRMLS_CC ) ? " *" : "" ,
644
651
#else
645
- nr_php_get_wraprec ( execute_data -> func ) ? " *" : "" ,
652
+ wr ? " *" : "" ,
646
653
#endif
647
654
NRP_FILENAME (filename ), NR_OP_ARRAY -> line_start );
648
655
} else if (NR_OP_ARRAY -> filename ) {
@@ -1928,7 +1935,7 @@ static void nr_php_instrument_func_begin(NR_EXECUTE_PROTO) {
1928
1935
*/
1929
1936
nr_php_observer_attempt_call_cufa_handler (NR_EXECUTE_ORIG_ARGS );
1930
1937
}
1931
- wraprec = nr_php_get_wraprec ( execute_data -> func );
1938
+ wraprec = nr_php_get_wraprec_from_op_array_extension ( __func__ , execute_data -> func );
1932
1939
1933
1940
segment = nr_segment_start (NRPRG (txn ), NULL , NULL );
1934
1941
0 commit comments