diff --git a/compiler/code-gen/vertex-compiler.cpp b/compiler/code-gen/vertex-compiler.cpp index a48574eeda..0ca596f4c0 100644 --- a/compiler/code-gen/vertex-compiler.cpp +++ b/compiler/code-gen/vertex-compiler.cpp @@ -917,7 +917,7 @@ void compile_func_call(VertexAdaptor root, CodeGenerator &W, func_ } if (is_function_call_should_be_tracked(func)) { - W << "SAVE_BUILTIN_CALL_STATS(\"" << func->name << "\", ("; + W << "DUMP_BUILTIN_CALL_STATS(\"" << func->name << "\", ("; } if (mode == func_call_mode::fork_call) { diff --git a/runtime-light/stdlib/diagnostics/functions-call-stats.h b/runtime-light/stdlib/diagnostics/functions-call-stats.h new file mode 100644 index 0000000000..c1914f1495 --- /dev/null +++ b/runtime-light/stdlib/diagnostics/functions-call-stats.h @@ -0,0 +1,9 @@ +// Compiler for PHP (aka KPHP) +// Copyright (c) 2026 LLC «V Kontakte» +// Distributed under the GPL v3 License, see LICENSE.notice.txt + +#pragma once + +#include "runtime-light/stdlib/diagnostics/logs.h" + +#define DUMP_BUILTIN_CALL_STATS(builtin_name, builtin_call) (kphp::log::debug("built-in called: " builtin_name), builtin_call) diff --git a/runtime/runtime-builtin-stats.h b/runtime/runtime-builtin-stats.h index 1964b4d1a0..e8a0306a38 100644 --- a/runtime/runtime-builtin-stats.h +++ b/runtime/runtime-builtin-stats.h @@ -49,6 +49,6 @@ inline void save_virtual_builtin_call_stats(const kphp::stl::string