Skip to content

Commit

Permalink
os/bluestore: dump allocator state at lowest debug level
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Dec 2, 2016
1 parent 9911f9f commit 3121892
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/os/bluestore/BitMapAllocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,24 +255,24 @@ uint64_t BitMapAllocator::get_free()
void BitMapAllocator::dump()
{
std::lock_guard<std::mutex> l(m_lock);
dout(30) << __func__ << " instance " << (uint64_t) this
dout(0) << __func__ << " instance " << (uint64_t) this
<< " committing: " << m_committing.num_intervals() << " extents"
<< dendl;

for (auto p = m_committing.begin();
p != m_committing.end(); ++p) {
dout(30) << __func__ << " instance " << (uint64_t) this
dout(0) << __func__ << " instance " << (uint64_t) this
<< " 0x" << std::hex << p.get_start()
<< "~" << p.get_len() << std::dec
<< dendl;
}
dout(30) << __func__ << " instance " << (uint64_t) this
dout(0) << __func__ << " instance " << (uint64_t) this
<< " uncommitted: " << m_uncommitted.num_intervals() << " extents"
<< dendl;

for (auto p = m_uncommitted.begin();
p != m_uncommitted.end(); ++p) {
dout(30) << __func__ << " 0x" << std::hex << p.get_start()
dout(0) << __func__ << " 0x" << std::hex << p.get_start()
<< "~" << p.get_len() << std::dec
<< dendl;
}
Expand Down
24 changes: 12 additions & 12 deletions src/os/bluestore/StupidAllocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,30 +265,30 @@ void StupidAllocator::dump()
{
std::lock_guard<std::mutex> l(lock);
for (unsigned bin = 0; bin < free.size(); ++bin) {
dout(30) << __func__ << " free bin " << bin << ": "
<< free[bin].num_intervals() << " extents" << dendl;
dout(0) << __func__ << " free bin " << bin << ": "
<< free[bin].num_intervals() << " extents" << dendl;
for (auto p = free[bin].begin();
p != free[bin].end();
++p) {
dout(30) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
dout(0) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
}
}
dout(30) << __func__ << " committing: "
<< committing.num_intervals() << " extents" << dendl;
dout(0) << __func__ << " committing: "
<< committing.num_intervals() << " extents" << dendl;
for (auto p = committing.begin();
p != committing.end();
++p) {
dout(30) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
dout(0) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
}
dout(30) << __func__ << " uncommitted: "
<< uncommitted.num_intervals() << " extents" << dendl;
dout(0) << __func__ << " uncommitted: "
<< uncommitted.num_intervals() << " extents" << dendl;
for (auto p = uncommitted.begin();
p != uncommitted.end();
++p) {
dout(30) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
dout(0) << __func__ << " 0x" << std::hex << p.get_start() << "~"
<< p.get_len() << std::dec << dendl;
}
}

Expand Down

0 comments on commit 3121892

Please sign in to comment.