| 811 | } |
| 812 | |
| 813 | string BufferPool::Client::DebugStringLocked() { |
| 814 | stringstream ss; |
| 815 | ss << Substitute("<BufferPool::Client> $0 name: $1 write_status: $2 " |
| 816 | "buffers allocated $3 num_pages: $4 pinned_bytes: $5 " |
| 817 | "dirty_unpinned_bytes: $6 in_flight_write_bytes: $7 reservation: {$8}", |
| 818 | this, name_, write_status_.GetDetail(), buffers_allocated_bytes_, num_pages_, |
| 819 | pinned_pages_.bytes(), dirty_unpinned_pages_.bytes(), |
| 820 | in_flight_write_pages_.bytes(), reservation_.DebugString()); |
| 821 | int page_to_print = min(pinned_pages_.size(), BufferPool::MAX_PAGE_ITER_DEBUG); |
| 822 | ss << "\n " << page_to_print << " out of " << pinned_pages_.size() |
| 823 | << " pinned pages: "; |
| 824 | pinned_pages_.IterateFirstN( |
| 825 | bind<bool>(Page::DebugStringCallback, &ss, _1), page_to_print); |
| 826 | |
| 827 | page_to_print = min(dirty_unpinned_pages_.size(), MAX_PAGE_ITER_DEBUG); |
| 828 | ss << "\n " << page_to_print << " out of " << dirty_unpinned_pages_.size() |
| 829 | << " dirty unpinned pages: "; |
| 830 | dirty_unpinned_pages_.IterateFirstN( |
| 831 | bind<bool>(Page::DebugStringCallback, &ss, _1), page_to_print); |
| 832 | |
| 833 | page_to_print = min(in_flight_write_pages_.size(), MAX_PAGE_ITER_DEBUG); |
| 834 | ss << "\n " << page_to_print << " out of " << in_flight_write_pages_.size() |
| 835 | << " in flight write pages: "; |
| 836 | in_flight_write_pages_.IterateFirstN( |
| 837 | bind<bool>(Page::DebugStringCallback, &ss, _1), page_to_print); |
| 838 | return ss.str(); |
| 839 | } |
| 840 | |
| 841 | string BufferPool::ClientHandle::DebugString() const { |
| 842 | if (is_registered()) { |
nothing calls this directly
no test coverage detected