From 48ef1508540b5df4535350d9ae324dafdc735aed Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Mon, 12 Jul 2021 18:47:53 +0000 Subject: [PATCH] common: fix missing name in PriorityCache perf counters There was a problem with PriorityCache perf counters, where part of the name was missing (i.e. "mon.a.cache_bytes" instead of "mon.a.prioritycache.cache_bytes"). The problem was happening because a 'this' pointer was missing in the original implementation. Signed-off-by: Laura Flores (cherry picked from commit 9e07175b3c9a5c69b8694bc05e0baa26a351582d) --- src/common/PriorityCache.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/PriorityCache.cc b/src/common/PriorityCache.cc index dcfc02d4b0fa4..d4b9c2080e799 100644 --- a/src/common/PriorityCache.cc +++ b/src/common/PriorityCache.cc @@ -73,8 +73,7 @@ namespace PriorityCache reserve_extra(reserve_extra), name(name.empty() ? "prioritycache" : name) { - PerfCountersBuilder b(cct, name, - MallocStats::M_FIRST, MallocStats::M_LAST); + PerfCountersBuilder b(cct, this->name, MallocStats::M_FIRST, MallocStats::M_LAST); b.add_u64(MallocStats::M_TARGET_BYTES, "target_bytes", "target process memory usage in bytes", "t", -- 2.39.5