Skip to content

Commit 29b11a7

Browse files
committed
second round of fixes
1 parent 22f158d commit 29b11a7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

agent/fw_drupal8.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ static void nr_drupal8_add_method_callback_before_after_clean(
171171
clean_callback);
172172

173173
nr_free(class_method);
174-
} else {
175-
nrl_always("%s::%s already has wraprec", nr_php_class_entry_name(ce), method);
176174
}
177175
}
178176
#endif // OAPI

agent/php_minit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "php_internal_instrument.h"
2020
#include "php_samplers.h"
2121
#include "php_user_instrument.h"
22+
#include "php_user_instrument_wraprec_hashmap.h"
2223
#include "php_vm.h"
2324
#include "php_wrapper.h"
2425
#include "fw_laravel.h"

agent/php_observer.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static zend_observer_fcall_handlers nr_php_fcall_register_handlers(
9393
if (OP_ARRAY_IS_A_METHOD(&execute_data->func->op_array)) {
9494
scope_name = execute_data->func->op_array.scope->name;
9595
func_name = execute_data->func->op_array.function_name;
96-
#if 1
96+
#if 0
9797
zend_long cn_hash = zend_hash_func(ZSTR_VAL(scope_name), ZSTR_LEN(scope_name));
9898
zend_long fn_hash = zend_hash_func(ZSTR_VAL(func_name), ZSTR_LEN(func_name));
9999
nrl_always("class_name=%s, class_name->h=%zu, cn_hash=%zu, function_name=%s, function_name->h=%zu, fn_hash=%zu",
@@ -102,22 +102,23 @@ static zend_observer_fcall_handlers nr_php_fcall_register_handlers(
102102
#endif
103103
} else if (OP_ARRAY_IS_A_FUNCTION(&execute_data->func->op_array)){
104104
func_name = execute_data->func->op_array.function_name;
105-
#if 1
105+
#if 0
106106
zend_long fn_hash = zend_hash_func(ZSTR_VAL(func_name), ZSTR_LEN(func_name));
107107
nrl_always("function_name=%s, function_name->h=%zu, fn_hash=%zu", ZSTR_VAL(func_name), func_name->h, fn_hash);
108108
#endif
109109
}
110110

111111
if (!ZEND_OP_ARRAY_EXTENSION(&execute_data->func->op_array, NR_PHP_PROCESS_GLOBALS(op_array_extension_handle))) {
112-
nrl_always("wraprec not installed yet");
112+
// nrl_always("wraprec not installed yet");
113113
wr = nr_php_user_instrument_wraprec_hashmap_get(func_name, scope_name);
114-
nrl_always("found wraprec=%p", wr);
114+
// nrl_always("found wraprec=%p", wr);
115115

116116
// store the wraprec in the op_array extension for the duration of the request for later lookup
117117
ZEND_OP_ARRAY_EXTENSION(&execute_data->func->op_array, NR_PHP_PROCESS_GLOBALS(op_array_extension_handle)) = wr;
118-
} else {
119-
nrl_always("wraprec already installed");
120118
}
119+
// else {
120+
// nrl_always("wraprec already installed");
121+
// }
121122

122123
handlers.begin = nr_php_observer_fcall_begin;
123124
handlers.end = nr_php_observer_fcall_end;

0 commit comments

Comments
 (0)