Skip to content

Commit

Permalink
librbd/cache/pwl: include head and tail pointers in STATS
Browse files Browse the repository at this point in the history
While at it, reduce the number of calls to operator<< and drop
the trailing comma.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
idryomov committed Apr 29, 2021
1 parent 626a995 commit 2a974fd
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/librbd/cache/pwl/AbstractWriteLog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,17 @@ void AbstractWriteLog<I>::log_perf() {
template <typename I>
void AbstractWriteLog<I>::periodic_stats() {
std::lock_guard locker(m_lock);
ldout(m_image_ctx.cct, 1) << "STATS: "
<< "m_free_log_entries=" << m_free_log_entries << ", "
<< "m_log_entries=" << m_log_entries.size() << ", "
<< "m_dirty_log_entries=" << m_dirty_log_entries.size() << ", "
<< "m_bytes_allocated=" << m_bytes_allocated << ", "
<< "m_bytes_cached=" << m_bytes_cached << ", "
<< "m_bytes_dirty=" << m_bytes_dirty << ", "
<< "bytes available=" << m_bytes_allocated_cap - m_bytes_allocated << ", "
<< "m_current_sync_gen=" << m_current_sync_gen << ", "
<< "m_flushed_sync_gen=" << m_flushed_sync_gen << ", "
ldout(m_image_ctx.cct, 1) << "STATS: m_log_entries=" << m_log_entries.size()
<< ", m_dirty_log_entries=" << m_dirty_log_entries.size()
<< ", m_free_log_entries=" << m_free_log_entries
<< ", m_bytes_allocated=" << m_bytes_allocated
<< ", m_bytes_cached=" << m_bytes_cached
<< ", m_bytes_dirty=" << m_bytes_dirty
<< ", bytes available=" << m_bytes_allocated_cap - m_bytes_allocated
<< ", m_first_valid_entry=" << m_first_valid_entry
<< ", m_first_free_entry=" << m_first_free_entry
<< ", m_current_sync_gen=" << m_current_sync_gen
<< ", m_flushed_sync_gen=" << m_flushed_sync_gen
<< dendl;
}

Expand Down

0 comments on commit 2a974fd

Please sign in to comment.