From f2f284f4ab536959d9d95cfc90764e7a63949f70 Mon Sep 17 00:00:00 2001 From: Dave Thaler Date: Mon, 12 Feb 2024 10:57:50 -0800 Subject: [PATCH] adjust_head statistic is not cross-platform safe Replace with a stat counting calls that reallocate packet, in a cross-platform way similar to the map_in_map stat. Fixes #583 Signed-off-by: Dave Thaler --- src/asm_cfg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/asm_cfg.cpp b/src/asm_cfg.cpp index 3787507fc..508f603ba 100644 --- a/src/asm_cfg.cpp +++ b/src/asm_cfg.cpp @@ -203,7 +203,7 @@ std::vector stats_headers() { return { "basic_blocks", "joins", "other", "jumps", "assign", "arith", "load", "store", "load_store", "packet_access", "call_1", "call_mem", - "call_nomem", "adjust_head", "map_in_map", "arith64", "arith32", + "call_nomem", "reallocate", "map_in_map", "arith64", "arith32", }; } @@ -224,8 +224,8 @@ std::map collect_stats(const cfg_t& cfg) { } if (std::holds_alternative(ins)) { auto call = std::get(ins); - if (call.func == 43 || call.func == 44) - res["adjust_head"] = 1; + if (call.reallocate_packet) + res["reallocate"] = 1; } if (std::holds_alternative(ins)) { auto const& bin = std::get(ins);