From 4f494385f55a1a04e3ccdabdad0d655766cbb265 Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Thu, 20 Aug 2026 13:59:44 +0300 Subject: [PATCH 1/7] add flushed_http_code tag --- runtime/interface.cpp | 7 ++++--- server/php-worker.cpp | 4 ++-- server/php-worker.h | 2 +- server/server-stats.cpp | 2 +- server/statshouse/statshouse-manager.cpp | 6 +++--- server/statshouse/statshouse-manager.h | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/runtime/interface.cpp b/runtime/interface.cpp index 7cf80c0400..3a0568ffc8 100644 --- a/runtime/interface.cpp +++ b/runtime/interface.cpp @@ -592,9 +592,9 @@ void f$flush() { } string_buffer const* http_body = compress_http_query_body(&oub[ob_system_level]); string_buffer const* http_headers = nullptr; - if (!php_worker->flushed_http_connection) { + if (!php_worker->flushed_http_code) { http_headers = get_headers(); - php_worker->flushed_http_connection = true; + php_worker->flushed_http_code = http_return_code; } http_send_immediate_response(http_headers ? http_headers->buffer() : nullptr, http_headers ? http_headers->size() : 0, http_body->buffer(), http_body->size()); @@ -612,7 +612,7 @@ void f$fastcgi_finish_request(int64_t exit_code) { headers_sent = true; } int ob_total_buffer = ob_merge_buffers(); - if (php_worker.has_value() && php_worker->flushed_http_connection) { + if (php_worker.has_value() && php_worker->flushed_http_code) { string const raw_response = oub[ob_total_buffer].str(); http_set_result(nullptr, 0, raw_response.c_str(), raw_response.size(), static_cast(exit_code)); php_assert(0); @@ -640,6 +640,7 @@ void f$fastcgi_finish_request(int64_t exit_code) { set_content_length_header(compressed->size()); } const string_buffer* headers = get_headers(); + php_worker->flushed_http_code = http_return_code; http_set_result(headers->buffer(), headers->size(), compressed->buffer(), compressed->size(), static_cast(exit_code)); break; diff --git a/server/php-worker.cpp b/server/php-worker.cpp index a35d4c8363..c042dc39a9 100644 --- a/server/php-worker.cpp +++ b/server/php-worker.cpp @@ -274,7 +274,7 @@ void PhpWorker::state_run() noexcept { if (conn != nullptr) { switch (mode) { case http_worker: - if (!flushed_http_connection) { + if (!flushed_http_code) { http_return(conn, "ERROR", 5); } break; @@ -448,7 +448,7 @@ PhpWorker::PhpWorker(php_worker_mode_t mode_, connection *c, php_query_data_t qu : conn(c) , data(std::move(query_data)) , paused(false) - , flushed_http_connection(false) + , flushed_http_code(0) , terminate_flag(false) , terminate_reason(script_error_t::unclassified_error) , error_message("no error") diff --git a/server/php-worker.h b/server/php-worker.h index 20a8ca44bf..15230106f9 100644 --- a/server/php-worker.h +++ b/server/php-worker.h @@ -40,7 +40,7 @@ class PhpWorker { php_query_data_t data; bool paused; - bool flushed_http_connection; + int flushed_http_code; bool terminate_flag; script_error_t terminate_reason; const char *error_message; diff --git a/server/server-stats.cpp b/server/server-stats.cpp index 4025d31f32..a81f155ba9 100644 --- a/server/server-stats.cpp +++ b/server/server-stats.cpp @@ -656,7 +656,7 @@ void ServerStats::add_request_stats(double script_time_sec, double net_time_sec, stats.add_request_stats(queries_stat, error, script_memory_stats, curl_total_allocated); shared_stats_->workers.add_worker_stats(queries_stat, worker_process_id_); - StatsHouseManager::get().add_request_stats(script_time.count(), net_time.count(), script_max_running_interval.count(), error, script_memory_stats, builtin_stats, script_queries, long_script_queries, + StatsHouseManager::get().add_request_stats(script_time.count(), net_time.count(), script_max_running_interval.count(), php_worker->flushed_http_code, error, script_memory_stats, builtin_stats, script_queries, long_script_queries, script_user_time.count(), script_system_time.count(), script_init_time.count(), http_connection_process_time.count(), script_rusage.voluntary_context_switches, script_rusage.involuntary_context_switches); diff --git a/server/statshouse/statshouse-manager.cpp b/server/statshouse/statshouse-manager.cpp index 30ea442d36..bfa009008b 100644 --- a/server/statshouse/statshouse-manager.cpp +++ b/server/statshouse/statshouse-manager.cpp @@ -110,7 +110,7 @@ void StatsHouseManager::generic_cron_check_if_tag_host_needed() { } } -void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, +void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, int flushed_http_code, script_error_t error, const memory_resource::MemoryStats &script_memory_stats, const std::optional &builtin_stats, uint64_t script_queries, uint64_t long_script_queries, uint64_t script_user_time_ns, uint64_t script_system_time_ns, @@ -126,7 +126,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_request_cpu_time").tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_request_init_time").tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { - client.metric("kphp_http_connection_process_time").tag(status).write_value(http_connection_process_time); + client.metric("kphp_http_connection_process_time").tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); } client.metric("kphp_by_host_request_time", true).tag("script").tag(worker_type).write_value(script_time_ns); @@ -135,7 +135,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_by_host_request_cpu_time", true).tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_by_host_request_init_time", true).tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { - client.metric("kphp_by_host_http_connection_process_time", true).tag(status).write_value(http_connection_process_time); + client.metric("kphp_by_host_http_connection_process_time", true).tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); } if (error != script_error_t::no_error) { diff --git a/server/statshouse/statshouse-manager.h b/server/statshouse/statshouse-manager.h index bd3cbd4f77..e022f14c2d 100644 --- a/server/statshouse/statshouse-manager.h +++ b/server/statshouse/statshouse-manager.h @@ -58,7 +58,7 @@ class StatsHouseManager : vk::not_copyable { return this->instance_cache_key_normalization_function != nullptr; } - void add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, + void add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, int flushed_http_code, script_error_t error, const memory_resource::MemoryStats &script_memory_stats, const std::optional &builtin_stats, uint64_t script_queries, uint64_t long_script_queries, uint64_t script_user_time_ns, uint64_t script_system_time_ns, From de1e7c38ca2e3fe14282da9cd3d092206ba397ec Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Wed, 26 Aug 2026 14:33:14 +0300 Subject: [PATCH 2/7] ignore "-Warray-bounds" --- server/statshouse/statshouse-manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/statshouse/statshouse-manager.cpp b/server/statshouse/statshouse-manager.cpp index bfa009008b..2f90c43ee9 100644 --- a/server/statshouse/statshouse-manager.cpp +++ b/server/statshouse/statshouse-manager.cpp @@ -126,7 +126,10 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_request_cpu_time").tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_request_init_time").tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" client.metric("kphp_http_connection_process_time").tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); +#pragma GCC diagnostic pop } client.metric("kphp_by_host_request_time", true).tag("script").tag(worker_type).write_value(script_time_ns); @@ -135,7 +138,10 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_by_host_request_cpu_time", true).tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_by_host_request_init_time", true).tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" client.metric("kphp_by_host_http_connection_process_time", true).tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); +#pragma GCC diagnostic pop } if (error != script_error_t::no_error) { From fa3b1cca4e12c060a953291d280460bdb6ca5c72 Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Wed, 26 Aug 2026 16:23:26 +0300 Subject: [PATCH 3/7] flushed_http_code = 500 --- server/php-worker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/php-worker.cpp b/server/php-worker.cpp index c042dc39a9..053bd59de5 100644 --- a/server/php-worker.cpp +++ b/server/php-worker.cpp @@ -275,6 +275,7 @@ void PhpWorker::state_run() noexcept { switch (mode) { case http_worker: if (!flushed_http_code) { + flushed_http_code = 500; http_return(conn, "ERROR", 5); } break; From 1e17d3bd8a5719e07abb511d07f7565c59676e95 Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Thu, 3 Sep 2026 15:48:19 +0300 Subject: [PATCH 4/7] use http_return_code global --- runtime/interface.cpp | 11 +++++++---- runtime/interface.h | 2 ++ server/php-engine.cpp | 1 + server/php-worker.cpp | 5 ++--- server/php-worker.h | 2 +- server/server-stats.cpp | 2 +- server/statshouse/statshouse-manager.cpp | 7 ++++--- server/statshouse/statshouse-manager.h | 2 +- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/runtime/interface.cpp b/runtime/interface.cpp index 3a0568ffc8..2e1caaac16 100644 --- a/runtime/interface.cpp +++ b/runtime/interface.cpp @@ -346,6 +346,10 @@ static void header(const char* str, int str_len, bool replace = true, int http_r } } +int& get_http_return_code() noexcept { + return http_return_code; +} + void f$header(const string& str, bool replace, int64_t http_response_code) { header(str.c_str(), (int)str.size(), replace, static_cast(http_response_code)); } @@ -592,9 +596,9 @@ void f$flush() { } string_buffer const* http_body = compress_http_query_body(&oub[ob_system_level]); string_buffer const* http_headers = nullptr; - if (!php_worker->flushed_http_code) { + if (!php_worker->flushed_http_connection) { http_headers = get_headers(); - php_worker->flushed_http_code = http_return_code; + php_worker->flushed_http_connection = true; } http_send_immediate_response(http_headers ? http_headers->buffer() : nullptr, http_headers ? http_headers->size() : 0, http_body->buffer(), http_body->size()); @@ -612,7 +616,7 @@ void f$fastcgi_finish_request(int64_t exit_code) { headers_sent = true; } int ob_total_buffer = ob_merge_buffers(); - if (php_worker.has_value() && php_worker->flushed_http_code) { + if (php_worker.has_value() && php_worker->flushed_http_connection) { string const raw_response = oub[ob_total_buffer].str(); http_set_result(nullptr, 0, raw_response.c_str(), raw_response.size(), static_cast(exit_code)); php_assert(0); @@ -640,7 +644,6 @@ void f$fastcgi_finish_request(int64_t exit_code) { set_content_length_header(compressed->size()); } const string_buffer* headers = get_headers(); - php_worker->flushed_http_code = http_return_code; http_set_result(headers->buffer(), headers->size(), compressed->buffer(), compressed->size(), static_cast(exit_code)); break; diff --git a/runtime/interface.h b/runtime/interface.h index 5cedcad033..6b87dc3ae2 100644 --- a/runtime/interface.h +++ b/runtime/interface.h @@ -52,6 +52,8 @@ Optional& get_dummy_headers_sent_filename() noexcept; Optional& get_dummy_headers_sent_line() noexcept; bool f$headers_sent(Optional& filename = get_dummy_headers_sent_filename(), Optional& line = get_dummy_headers_sent_line()); +int& get_http_return_code() noexcept; + void f$header(const string& str, bool replace = true, int64_t http_response_code = 0); array f$headers_list(); diff --git a/server/php-engine.cpp b/server/php-engine.cpp index ab6221f29f..7a321574f7 100644 --- a/server/php-engine.cpp +++ b/server/php-engine.cpp @@ -490,6 +490,7 @@ void http_return(connection *c, const char *str, int len) { if (len < 0) { len = (int)strlen(str); } + get_http_return_code() = 500; write_basic_http_header(c, 500, 0, len, no_cache_headers, "text/plain; charset=UTF-8"); write_out(&c->Out, str, len); } diff --git a/server/php-worker.cpp b/server/php-worker.cpp index 053bd59de5..a35d4c8363 100644 --- a/server/php-worker.cpp +++ b/server/php-worker.cpp @@ -274,8 +274,7 @@ void PhpWorker::state_run() noexcept { if (conn != nullptr) { switch (mode) { case http_worker: - if (!flushed_http_code) { - flushed_http_code = 500; + if (!flushed_http_connection) { http_return(conn, "ERROR", 5); } break; @@ -449,7 +448,7 @@ PhpWorker::PhpWorker(php_worker_mode_t mode_, connection *c, php_query_data_t qu : conn(c) , data(std::move(query_data)) , paused(false) - , flushed_http_code(0) + , flushed_http_connection(false) , terminate_flag(false) , terminate_reason(script_error_t::unclassified_error) , error_message("no error") diff --git a/server/php-worker.h b/server/php-worker.h index 15230106f9..20a8ca44bf 100644 --- a/server/php-worker.h +++ b/server/php-worker.h @@ -40,7 +40,7 @@ class PhpWorker { php_query_data_t data; bool paused; - int flushed_http_code; + bool flushed_http_connection; bool terminate_flag; script_error_t terminate_reason; const char *error_message; diff --git a/server/server-stats.cpp b/server/server-stats.cpp index a81f155ba9..4025d31f32 100644 --- a/server/server-stats.cpp +++ b/server/server-stats.cpp @@ -656,7 +656,7 @@ void ServerStats::add_request_stats(double script_time_sec, double net_time_sec, stats.add_request_stats(queries_stat, error, script_memory_stats, curl_total_allocated); shared_stats_->workers.add_worker_stats(queries_stat, worker_process_id_); - StatsHouseManager::get().add_request_stats(script_time.count(), net_time.count(), script_max_running_interval.count(), php_worker->flushed_http_code, error, script_memory_stats, builtin_stats, script_queries, long_script_queries, + StatsHouseManager::get().add_request_stats(script_time.count(), net_time.count(), script_max_running_interval.count(), error, script_memory_stats, builtin_stats, script_queries, long_script_queries, script_user_time.count(), script_system_time.count(), script_init_time.count(), http_connection_process_time.count(), script_rusage.voluntary_context_switches, script_rusage.involuntary_context_switches); diff --git a/server/statshouse/statshouse-manager.cpp b/server/statshouse/statshouse-manager.cpp index 2f90c43ee9..6e3ca6baea 100644 --- a/server/statshouse/statshouse-manager.cpp +++ b/server/statshouse/statshouse-manager.cpp @@ -17,6 +17,7 @@ #include "common/resolver.h" #include "common/wrappers/overloaded.h" #include "runtime/instance-cache.h" +#include "runtime/interface.h" #include "runtime/runtime-builtin-stats.h" #include "server/confdata-stats.h" #include "server/job-workers/shared-memory-manager.h" @@ -110,7 +111,7 @@ void StatsHouseManager::generic_cron_check_if_tag_host_needed() { } } -void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, int flushed_http_code, script_error_t error, +void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, const memory_resource::MemoryStats &script_memory_stats, const std::optional &builtin_stats, uint64_t script_queries, uint64_t long_script_queries, uint64_t script_user_time_ns, uint64_t script_system_time_ns, @@ -128,7 +129,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ if (process_type == ProcessType::http_worker) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" - client.metric("kphp_http_connection_process_time").tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); + client.metric("kphp_http_connection_process_time").tag("return_code", std::to_string(get_http_return_code())).tag(status).write_value(http_connection_process_time); #pragma GCC diagnostic pop } @@ -140,7 +141,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ if (process_type == ProcessType::http_worker) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" - client.metric("kphp_by_host_http_connection_process_time", true).tag("flushed_http_code", std::to_string(flushed_http_code)).tag(status).write_value(http_connection_process_time); + client.metric("kphp_by_host_http_connection_process_time", true).tag("return_code", std::to_string(get_http_return_code())).tag(status).write_value(http_connection_process_time); #pragma GCC diagnostic pop } diff --git a/server/statshouse/statshouse-manager.h b/server/statshouse/statshouse-manager.h index e022f14c2d..bd3cbd4f77 100644 --- a/server/statshouse/statshouse-manager.h +++ b/server/statshouse/statshouse-manager.h @@ -58,7 +58,7 @@ class StatsHouseManager : vk::not_copyable { return this->instance_cache_key_normalization_function != nullptr; } - void add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, int flushed_http_code, script_error_t error, + void add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, const memory_resource::MemoryStats &script_memory_stats, const std::optional &builtin_stats, uint64_t script_queries, uint64_t long_script_queries, uint64_t script_user_time_ns, uint64_t script_system_time_ns, From ddd8559c82fd5617aec37d19b9d7fe7b1567342e Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Thu, 3 Sep 2026 15:55:42 +0300 Subject: [PATCH 5/7] remove pragma --- server/statshouse/statshouse-manager.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/statshouse/statshouse-manager.cpp b/server/statshouse/statshouse-manager.cpp index 6e3ca6baea..b36716dda5 100644 --- a/server/statshouse/statshouse-manager.cpp +++ b/server/statshouse/statshouse-manager.cpp @@ -127,10 +127,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_request_cpu_time").tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_request_init_time").tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" client.metric("kphp_http_connection_process_time").tag("return_code", std::to_string(get_http_return_code())).tag(status).write_value(http_connection_process_time); -#pragma GCC diagnostic pop } client.metric("kphp_by_host_request_time", true).tag("script").tag(worker_type).write_value(script_time_ns); @@ -139,10 +136,7 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_ client.metric("kphp_by_host_request_cpu_time", true).tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns); client.metric("kphp_by_host_request_init_time", true).tag(worker_type).tag(status).write_value(script_init_time); if (process_type == ProcessType::http_worker) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" client.metric("kphp_by_host_http_connection_process_time", true).tag("return_code", std::to_string(get_http_return_code())).tag(status).write_value(http_connection_process_time); -#pragma GCC diagnostic pop } if (error != script_error_t::no_error) { From 323ca4312c2d677ed703bcfdb7eb66d280a6298e Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Thu, 3 Sep 2026 16:45:37 +0300 Subject: [PATCH 6/7] add space --- server/statshouse/statshouse-manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/statshouse/statshouse-manager.cpp b/server/statshouse/statshouse-manager.cpp index b36716dda5..a1af3a1806 100644 --- a/server/statshouse/statshouse-manager.cpp +++ b/server/statshouse/statshouse-manager.cpp @@ -111,7 +111,7 @@ void StatsHouseManager::generic_cron_check_if_tag_host_needed() { } } -void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, +void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_time_ns, uint64_t script_max_running_interval_ns, script_error_t error, const memory_resource::MemoryStats &script_memory_stats, const std::optional &builtin_stats, uint64_t script_queries, uint64_t long_script_queries, uint64_t script_user_time_ns, uint64_t script_system_time_ns, From e4a70c955c56b000a1bab8615b4067afbbdef26e Mon Sep 17 00:00:00 2001 From: Karim Shamazov Date: Fri, 4 Sep 2026 17:06:56 +0300 Subject: [PATCH 7/7] fix GCC 8 false positive -Warray-bounds in statshouse pack_string GCC 8 inlines copies of pack_string into callers and merges them (cross-jumping), after which it loses the relation between `len` and the source object and emits false positive -Warray-bounds for small string literals. Mark pack_string noinline for GCC 8 only. Co-Authored-By: Claude Code --- third-party/statshouse.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/third-party/statshouse.h b/third-party/statshouse.h index 83acec13e1..6046b627d1 100644 --- a/third-party/statshouse.h +++ b/third-party/statshouse.h @@ -442,7 +442,16 @@ class TransportUDPBase { return 0; // if even more tags added, we do not care, so empty string is good enough. return names[i]; } - static char * pack_string(char * begin, const char * end, const char * str, size_t len) { + // GCC 8 inlines copies of this function into the caller and merges them + // (cross-jumping), after which it loses the relation between `len` and the + // source object and emits false positive -Warray-bounds for small string + // literals. noinline prevents the merge and keeps each call analyzable. +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ == 8 +#define STATSHOUSE_PACK_STRING_NOINLINE __attribute__((noinline)) +#else +#define STATSHOUSE_PACK_STRING_NOINLINE +#endif + static STATSHOUSE_PACK_STRING_NOINLINE char * pack_string(char * begin, const char * end, const char * str, size_t len) { if (STATSHOUSE_UNLIKELY(len > TL_MAX_TINY_STRING_LEN)) { if (STATSHOUSE_UNLIKELY(len > TL_BIG_STRING_LEN)) { len = TL_BIG_STRING_LEN; @@ -467,6 +476,7 @@ class TransportUDPBase { } return begin; } +#undef STATSHOUSE_PACK_STRING_NOINLINE char * pack_header(uint32_t now, size_t min_space, const MetricBuilder & metric, double counter, uint32_t tsUnixSec, size_t fields_mask) { if (STATSHOUSE_UNLIKELY(metric.did_not_fit)) {