summaryrefslogtreecommitdiff
path: root/src/conn/conn_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r--src/conn/conn_cache.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c
index d62425fe536..8f62c7140c7 100644
--- a/src/conn/conn_cache.c
+++ b/src/conn/conn_cache.c
@@ -156,7 +156,8 @@ __wt_cache_create(WT_SESSION_IMPL *session, const char *cfg[])
/* Allocate the LRU eviction queue. */
cache->evict_slots = WT_EVICT_WALK_BASE + WT_EVICT_WALK_INCR;
- WT_ERR(__wt_calloc_def(session, cache->evict_slots, &cache->evict));
+ WT_ERR(__wt_calloc_def(session,
+ cache->evict_slots, &cache->evict_queue));
/*
* We get/set some values in the cache statistics (rather than have
@@ -178,12 +179,12 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session)
{
WT_CACHE *cache;
WT_CONNECTION_IMPL *conn;
- WT_CONNECTION_STATS *stats;
+ WT_CONNECTION_STATS **stats;
uint64_t inuse, leaf, used;
conn = S2C(session);
cache = conn->cache;
- stats = &conn->stats;
+ stats = conn->stats;
inuse = __wt_cache_bytes_inuse(cache);
/*
@@ -193,19 +194,23 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session)
used = cache->bytes_overflow + cache->bytes_internal;
leaf = inuse > used ? inuse - used : 0;
- WT_STAT_SET(stats, cache_bytes_max, conn->cache_size);
- WT_STAT_SET(stats, cache_bytes_inuse, inuse);
+ WT_STAT_SET(session, stats, cache_bytes_max, conn->cache_size);
+ WT_STAT_SET(session, stats, cache_bytes_inuse, inuse);
- WT_STAT_SET(stats, cache_overhead, cache->overhead_pct);
- WT_STAT_SET(stats, cache_pages_inuse, __wt_cache_pages_inuse(cache));
- WT_STAT_SET(stats, cache_bytes_dirty, __wt_cache_dirty_inuse(cache));
- WT_STAT_SET(stats,
+ WT_STAT_SET(session, stats, cache_overhead, cache->overhead_pct);
+ WT_STAT_SET(
+ session, stats, cache_pages_inuse, __wt_cache_pages_inuse(cache));
+ WT_STAT_SET(
+ session, stats, cache_bytes_dirty, __wt_cache_dirty_inuse(cache));
+ WT_STAT_SET(session, stats,
cache_eviction_maximum_page_size, cache->evict_max_page_size);
- WT_STAT_SET(stats, cache_pages_dirty, cache->pages_dirty);
+ WT_STAT_SET(session, stats, cache_pages_dirty, cache->pages_dirty);
- WT_STAT_SET(stats, cache_bytes_internal, cache->bytes_internal);
- WT_STAT_SET(stats, cache_bytes_overflow, cache->bytes_overflow);
- WT_STAT_SET(stats, cache_bytes_leaf, leaf);
+ WT_STAT_SET(
+ session, stats, cache_bytes_internal, cache->bytes_internal);
+ WT_STAT_SET(
+ session, stats, cache_bytes_overflow, cache->bytes_overflow);
+ WT_STAT_SET(session, stats, cache_bytes_leaf, leaf);
}
/*
@@ -246,7 +251,7 @@ __wt_cache_destroy(WT_SESSION_IMPL *session)
__wt_spin_destroy(session, &cache->evict_lock);
__wt_spin_destroy(session, &cache->evict_walk_lock);
- __wt_free(session, cache->evict);
+ __wt_free(session, cache->evict_queue);
__wt_free(session, conn->cache);
return (ret);
}