summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 0656cb5..646b235 100644
--- a/thread.c
+++ b/thread.c
@@ -641,6 +641,8 @@ void threadlocal_stats_reset(void) {
memset(&threads[ii].stats.slab_stats, 0,
sizeof(threads[ii].stats.slab_stats));
+ memset(&threads[ii].stats.lru_hits, 0,
+ sizeof(uint64_t) * POWER_LARGEST);
pthread_mutex_unlock(&threads[ii].stats.mutex);
}
@@ -666,6 +668,13 @@ void threadlocal_stats_aggregate(struct thread_stats *stats) {
#undef X
}
+ for (sid = 0; sid < POWER_LARGEST; sid++) {
+ stats->lru_hits[sid] +=
+ threads[ii].stats.lru_hits[sid];
+ stats->slab_stats[CLEAR_LRU(sid)].get_hits +=
+ threads[ii].stats.lru_hits[sid];
+ }
+
pthread_mutex_unlock(&threads[ii].stats.mutex);
}
}