]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: fix missing name in PriorityCache perf counters 45588/head
authorLaura Flores <lflores@redhat.com>
Mon, 12 Jul 2021 18:47:53 +0000 (18:47 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 23 Mar 2022 15:30:47 +0000 (10:30 -0500)
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 <lflores@redhat.com>
(cherry picked from commit 9e07175b3c9a5c69b8694bc05e0baa26a351582d)

src/common/PriorityCache.cc

index dcfc02d4b0fa4f59096fb1b95a5fed55e1df7ad0..d4b9c2080e7997f321ee6121cfca7459276b8fd4 100644 (file)
@@ -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",