From 0f0da211988b07d5d4d5350ae9c5798a6b13d160 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Fri, 28 May 2021 02:08:25 -0400 Subject: [PATCH] context: track record extent reference counts This might be interesting information, though most of the motivation for this evaporated when kernel 5.7 came out. Signed-off-by: Zygo Blaxell --- src/bees-context.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/bees-context.cc b/src/bees-context.cc index 4df4a78..5369e71 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -903,6 +903,18 @@ BeesContext::resolve_addr_uncached(BeesAddress addr) rv.m_is_toxic = true; } + // Count how many times this happens so we can figure out how + // important this case is + size_t rv_count = rv.m_biors.size(); + static size_t most_refs_ever = 2730; + if (rv_count > most_refs_ever) { + BEESLOGINFO("addr " << addr << " refs " << rv_count << " beats previous record " << most_refs_ever); + most_refs_ever = rv_count; + } + if (rv_count > 2730) { + BEESCOUNT(resolve_large); + } + return rv; }