diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-03-07 13:25:57 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-07 02:57:10 +0000 |
commit | 532103cfd11eaf41736a2fb5054e6ff655301da9 (patch) | |
tree | 0e7b25a752f6f4c55661c8228c140e863cba540a /src/third_party | |
parent | 477d12a234714b46781506e4ce0f80542098040e (diff) | |
download | mongo-532103cfd11eaf41736a2fb5054e6ff655301da9.tar.gz |
Import wiredtiger: ef1dce1894ff5bff6a0a1511d8fec68511d5d851 from branch mongodb-master
ref: f8ce3f65b8..ef1dce1894
for: 6.0.0
WT-8870 Dumping cache debug info doesn't work for pages smaller than 1 MB
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_lru.c | 55 |
2 files changed, 28 insertions, 29 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index c408181e7bd..46b503b7ac4 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "f8ce3f65b8c41015ce4fe8a2f9992f7760247bdf" + "commit": "ef1dce1894ff5bff6a0a1511d8fec68511d5d851" } diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c index 694eb4c59d4..0cdcd31ad14 100644 --- a/src/third_party/wiredtiger/src/evict/evict_lru.c +++ b/src/third_party/wiredtiger/src/evict/evict_lru.c @@ -2617,31 +2617,30 @@ __verbose_dump_cache_single(WT_SESSION_IMPL *session, uint64_t *total_bytesp, WT_RET( __wt_msg(session, "internal: " - "%" PRIu64 " pages, " - "%" PRIu64 "MB, " + "%" PRIu64 " pages, %.2f KB, " "%" PRIu64 "/%" PRIu64 " clean/dirty pages, " - "%" PRIu64 "/%" PRIu64 " clean/dirty MB, " - "%" PRIu64 "MB max page, " - "%" PRIu64 "MB max dirty page", - intl_pages, intl_bytes / WT_MEGABYTE, intl_pages - intl_dirty_pages, intl_dirty_pages, - (intl_bytes - intl_dirty_bytes) / WT_MEGABYTE, intl_dirty_bytes / WT_MEGABYTE, - intl_bytes_max / WT_MEGABYTE, intl_dirty_bytes_max / WT_MEGABYTE)); + "%.2f/%.2f clean / dirty KB, " + "%.2f KB max page, " + "%.2f KB max dirty page ", + intl_pages, (double)intl_bytes / WT_KILOBYTE, intl_pages - intl_dirty_pages, + intl_dirty_pages, (double)(intl_bytes - intl_dirty_bytes) / WT_KILOBYTE, + (double)intl_dirty_bytes / WT_KILOBYTE, (double)intl_bytes_max / WT_KILOBYTE, + (double)intl_dirty_bytes_max / WT_KILOBYTE)); if (leaf_pages == 0) WT_RET(__wt_msg(session, "leaf: 0 pages")); else WT_RET( __wt_msg(session, "leaf: " - "%" PRIu64 " pages, " - "%" PRIu64 "MB, " + "%" PRIu64 " pages, %.2f KB, " "%" PRIu64 "/%" PRIu64 " clean/dirty pages, " - "%" PRIu64 "/%" PRIu64 "/%" PRIu64 " clean/dirty/updates MB, " - "%" PRIu64 "MB max page, " - "%" PRIu64 "MB max dirty page", - leaf_pages, leaf_bytes / WT_MEGABYTE, leaf_pages - leaf_dirty_pages, leaf_dirty_pages, - (leaf_bytes - leaf_dirty_bytes) / WT_MEGABYTE, leaf_dirty_bytes / WT_MEGABYTE, - updates_bytes / WT_MEGABYTE, leaf_bytes_max / WT_MEGABYTE, - leaf_dirty_bytes_max / WT_MEGABYTE)); + "%.2f /%.2f /%.2f clean/dirty/updates KB, " + "%.2f KB max page, " + "%.2f KB max dirty page", + leaf_pages, (double)leaf_bytes / WT_KILOBYTE, leaf_pages - leaf_dirty_pages, + leaf_dirty_pages, (double)(leaf_bytes - leaf_dirty_bytes) / WT_KILOBYTE, + (double)leaf_dirty_bytes / WT_KILOBYTE, (double)updates_bytes / WT_KILOBYTE, + (double)leaf_bytes_max / WT_KILOBYTE, (double)leaf_dirty_bytes_max / WT_KILOBYTE)); *total_bytesp += intl_bytes + leaf_bytes; *total_dirty_bytesp += intl_dirty_bytes + leaf_dirty_bytes; @@ -2693,12 +2692,12 @@ __wt_verbose_dump_cache(WT_SESSION_IMPL *session) WT_CONNECTION_IMPL *conn; WT_DECL_RET; double pct; - uint64_t total_bytes, total_dirty_bytes, total_updates_bytes; + uint64_t total_bytes, total_dirty_bytes, total_updates_bytes, cache_bytes_updates; bool needed; conn = S2C(session); cache = conn->cache; - total_bytes = total_dirty_bytes = total_updates_bytes = 0; + total_bytes = total_dirty_bytes = total_updates_bytes = cache_bytes_updates = 0; pct = 0.0; /* [-Werror=uninitialized] */ WT_RET(__wt_msg(session, "%s", WT_DIVIDER)); @@ -2721,15 +2720,15 @@ __wt_verbose_dump_cache(WT_SESSION_IMPL *session) * Apply the overhead percentage so our total bytes are comparable with the tracked value. */ total_bytes = __wt_cache_bytes_plus_overhead(conn->cache, total_bytes); - - WT_RET( - __wt_msg(session, "cache dump: total found: %" PRIu64 "MB vs tracked inuse %" PRIu64 "MB", - total_bytes / WT_MEGABYTE, cache->bytes_inmem / WT_MEGABYTE)); - WT_RET(__wt_msg(session, "total dirty bytes: %" PRIu64 "MB vs tracked dirty %" PRIu64 "MB", - total_dirty_bytes / WT_MEGABYTE, - (cache->bytes_dirty_intl + cache->bytes_dirty_leaf) / WT_MEGABYTE)); - WT_RET(__wt_msg(session, "total updates bytes: %" PRIu64 "MB vs tracked updates %" PRIu64 "MB", - total_updates_bytes / WT_MEGABYTE, __wt_cache_bytes_updates(cache) / WT_MEGABYTE)); + cache_bytes_updates = __wt_cache_bytes_updates(cache); + + WT_RET(__wt_msg(session, "cache dump: total found: %.2f MB vs tracked inuse %.2f MB", + (double)total_bytes / WT_MEGABYTE, (double)cache->bytes_inmem / WT_MEGABYTE)); + WT_RET(__wt_msg(session, "total dirty bytes: %.2f MB vs tracked dirty %.2f MB", + (double)total_dirty_bytes / WT_MEGABYTE, + (double)(cache->bytes_dirty_intl + cache->bytes_dirty_leaf) / WT_MEGABYTE)); + WT_RET(__wt_msg(session, "total updates bytes: %.2f MB vs tracked updates %.2f MB", + (double)total_updates_bytes / WT_MEGABYTE, (double)cache_bytes_updates / WT_MEGABYTE)); return (0); } |