Page MenuHomePhabricator
Paste P79272

(An Untitled Masterwork)
ActivePublic

Authored by • Scott_French on Jul 16 2025, 11:35 PM.
Project Tags
None
Referenced Files
F64896290: raw-paste-data.txt
Jul 16 2025, 11:35 PM
Subscribers
None
Skip superfluous zend internal function frames in the callstack on entry to
tracer_observer_begin / tracer_observer_end.
A similar fix was employed in https://github.com/longxinH/xhprof/issues/68.
--- a/tideways_xhprof.c
+++ b/tideways_xhprof.c
@@ -28,6 +28,10 @@
#include "zend_observer.h"
static void tracer_observer_begin(zend_execute_data *ex) {
+#if PHP_VERSION_ID >= 80200
+ if (ex->func->type == ZEND_INTERNAL_FUNCTION) return;
+#endif
+
if (!TXRG(enabled)) {
return;
}
@@ -36,6 +40,10 @@
}
static void tracer_observer_end(zend_execute_data *ex, zval *return_value) {
+#if PHP_VERSION_ID >= 80200
+ if (ex->func->type == ZEND_INTERNAL_FUNCTION) return;
+#endif
+
if (!TXRG(enabled)) {
return;
}