From 03eb7b4d3081a50f8371f9778cdf876fd9a6795c Mon Sep 17 00:00:00 2001 From: Andrey Arutiunian <110744283+andreylzmw@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:38:33 +0300 Subject: [PATCH] Fix issue with get_global_vars_memory_stats() (#968) --- runtime/kphp_tracing.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/kphp_tracing.h b/runtime/kphp_tracing.h index e773489a03..3517d6288c 100644 --- a/runtime/kphp_tracing.h +++ b/runtime/kphp_tracing.h @@ -9,6 +9,7 @@ #include "runtime/critical_section.h" #include "runtime/kphp_core.h" #include "runtime/refcountable_php_classes.h" +#include "runtime/dummy-visitor-methods.h" // for detailed comments about tracing in general, see kphp_tracing.cpp @@ -109,7 +110,9 @@ void on_php_script_finish_terminated(); // class KphpDiv -struct C$KphpDiv : public refcountable_php_classes { +struct C$KphpDiv : public refcountable_php_classes, private DummyVisitorMethods { + using DummyVisitorMethods::accept; + double start_timestamp{0.0}; // all fields are inaccessible from PHP code double end_timestamp{0.0}; // (PHP code can only call f$KphpDiv$$ functions) int64_t trace_id{0}; @@ -129,7 +132,9 @@ int64_t f$KphpDiv$$assignTraceCtx(class_instance v$this, int64_t int1 // class KphpSpan -struct C$KphpSpan : public refcountable_php_classes { +struct C$KphpSpan : public refcountable_php_classes, private DummyVisitorMethods { + using DummyVisitorMethods::accept; + int span_id{0}; C$KphpSpan() = default;