summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/support')
-rw-r--r--src/third_party/wiredtiger/src/support/rand.c12
-rw-r--r--src/third_party/wiredtiger/src/support/stat.c23
2 files changed, 20 insertions, 15 deletions
diff --git a/src/third_party/wiredtiger/src/support/rand.c b/src/third_party/wiredtiger/src/support/rand.c
index 7dfb98c5ca4..caac04d3529 100644
--- a/src/third_party/wiredtiger/src/support/rand.c
+++ b/src/third_party/wiredtiger/src/support/rand.c
@@ -41,18 +41,18 @@
* of the values to avoid that, and read/write in atomic, 8B chunks.
*/
#undef M_W
-#define M_W(p) ((uint32_t *)&(p))[0]
+#define M_W(r) r.x.w
#undef M_Z
-#define M_Z(p) ((uint32_t *)&(p))[1]
+#define M_Z(r) r.x.z
/*
* __wt_random_init --
* Initialize return of a 32-bit pseudo-random number.
*/
void
-__wt_random_init(uint64_t volatile * rnd_state)
+__wt_random_init(WT_RAND_STATE volatile * rnd_state)
{
- uint64_t rnd;
+ WT_RAND_STATE rnd;
M_W(rnd) = 521288629;
M_Z(rnd) = 362436069;
@@ -64,9 +64,9 @@ __wt_random_init(uint64_t volatile * rnd_state)
* Return a 32-bit pseudo-random number.
*/
uint32_t
-__wt_random(uint64_t volatile * rnd_state)
+__wt_random(WT_RAND_STATE volatile * rnd_state)
{
- uint64_t rnd;
+ WT_RAND_STATE rnd;
uint32_t w, z;
/*
diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c
index b0e7d660587..b706263d1ce 100644
--- a/src/third_party/wiredtiger/src/support/stat.c
+++ b/src/third_party/wiredtiger/src/support/stat.c
@@ -444,11 +444,15 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats)
stats->cursor_search.desc = "cursor: cursor search calls";
stats->cursor_search_near.desc = "cursor: cursor search near calls";
stats->cursor_update.desc = "cursor: cursor update calls";
- stats->dh_conn_ref.desc =
- "data-handle: connection candidate referenced";
- stats->dh_conn_handles.desc = "data-handle: connection dhandles swept";
- stats->dh_conn_sweeps.desc = "data-handle: connection sweeps";
- stats->dh_conn_tod.desc = "data-handle: connection time-of-death sets";
+ stats->dh_sweep_ref.desc =
+ "data-handle: connection sweep candidate became referenced";
+ stats->dh_sweep_close.desc =
+ "data-handle: connection sweep dhandles closed";
+ stats->dh_sweep_remove.desc =
+ "data-handle: connection sweep dhandles removed from hash list";
+ stats->dh_sweep_tod.desc =
+ "data-handle: connection sweep time-of-death sets";
+ stats->dh_sweeps.desc = "data-handle: connection sweeps";
stats->dh_session_handles.desc = "data-handle: session dhandles swept";
stats->dh_session_sweeps.desc = "data-handle: session sweep attempts";
stats->log_slot_closes.desc = "log: consolidated slot closures";
@@ -618,10 +622,11 @@ __wt_stat_refresh_connection_stats(void *stats_arg)
stats->cursor_search.v = 0;
stats->cursor_search_near.v = 0;
stats->cursor_update.v = 0;
- stats->dh_conn_ref.v = 0;
- stats->dh_conn_handles.v = 0;
- stats->dh_conn_sweeps.v = 0;
- stats->dh_conn_tod.v = 0;
+ stats->dh_sweep_ref.v = 0;
+ stats->dh_sweep_close.v = 0;
+ stats->dh_sweep_remove.v = 0;
+ stats->dh_sweep_tod.v = 0;
+ stats->dh_sweeps.v = 0;
stats->dh_session_handles.v = 0;
stats->dh_session_sweeps.v = 0;
stats->log_slot_closes.v = 0;