From 4b0a0a10230928c0fb317837584152a7c52f3eaa Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 Feb 2014 10:52:36 -0800 Subject: [PATCH] osd: l_osd_copyfrom Signed-off-by: Sage Weil --- src/osd/OSD.cc | 2 ++ src/osd/OSD.h | 2 ++ src/osd/ReplicatedPG.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index de59ca5d22d..a5ba1652f3e 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1432,6 +1432,8 @@ void OSD::create_logger() osd_plb.add_u64(l_osd_stat_bytes_used, "stat_bytes_used"); osd_plb.add_u64(l_osd_stat_bytes_avail, "stat_bytes_avail"); + osd_plb.add_u64_counter(l_osd_copyfrom, "copyfrom"); + osd_plb.add_u64_counter(l_osd_tier_promote, "tier_promote"); logger = osd_plb.create_perf_counters(); cct->get_perfcounters_collection()->add(logger); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index af7eebc0a25..ed9bc4e0948 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -122,6 +122,8 @@ enum { l_osd_stat_bytes_used, l_osd_stat_bytes_avail, + l_osd_copyfrom, + l_osd_tier_promote, l_osd_last, }; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 42286096d6a..25ab99bebe6 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5515,6 +5515,8 @@ void ReplicatedPG::finish_copyfrom(OpContext *ctx) } ctx->delta_stats.num_wr++; ctx->delta_stats.num_wr_kb += SHIFT_ROUND_UP(obs.oi.size, 10); + + osd->logger->inc(l_osd_copyfrom); } void ReplicatedPG::finish_promote(int r, OpRequestRef op,