Skip to content

Commit

Permalink
fix issue60
Browse files Browse the repository at this point in the history
fix issue60 #60
  • Loading branch information
longxinH committed Jul 4, 2021
1 parent 8a084ee commit 299727a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,25 +999,21 @@ void hp_mode_sampled_endfn_cb(hp_entry_t **entries)

#if PHP_VERSION_ID >= 80000
static void tracer_observer_begin(zend_execute_data *execute_data) {
if (!XHPROF_G(enabled)) {
return;
}

begin_profiling(NULL, execute_data);
}

static void tracer_observer_end(zend_execute_data *ex, zval *return_value) {
if (!XHPROF_G(enabled)) {
return;
}

if (XHPROF_G(entries)) {
end_profiling();
}
}


static zend_observer_fcall_handlers tracer_observer(zend_execute_data *execute_data) {
if (!XHPROF_G(enabled)) {
return (zend_observer_fcall_handlers){NULL, NULL};
}

zend_function *func = execute_data->func;

if (!func->common.function_name) {
Expand Down

0 comments on commit 299727a

Please sign in to comment.