summaryrefslogtreecommitdiff
path: root/src/log/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log/log.c')
-rw-r--r--src/log/log.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/log/log.c b/src/log/log.c
index b17f31d5d16..b0c789f0f9e 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -133,8 +133,8 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn)
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_dir_lsn = *min_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync_dir);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync_dir);
+ WT_STAT_CONN_INCRV(session,
log_sync_dir_duration, fsync_duration_usecs);
}
/*
@@ -157,8 +157,8 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn)
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_lsn = *min_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync);
+ WT_STAT_CONN_INCRV(session,
log_sync_duration, fsync_duration_usecs);
WT_ERR(__wt_close(session, &log_fh));
__wt_cond_signal(session, log->log_sync_cond);
@@ -410,7 +410,7 @@ __log_zero(WT_SESSION_IMPL *session,
bufsz = (uint32_t)conn->log_file_max;
WT_RET(__wt_scr_alloc(session, bufsz, &zerobuf));
memset(zerobuf->mem, 0, zerobuf->memsize);
- WT_STAT_FAST_CONN_INCR(session, log_zero_fills);
+ WT_STAT_CONN_INCR(session, log_zero_fills);
/*
* Read in a chunk starting at the end of the file. Keep going until
@@ -580,7 +580,7 @@ __log_fill(WT_SESSION_IMPL *session,
myslot->offset + myslot->slot->slot_start_offset,
record->size, record->mem));
- WT_STAT_FAST_CONN_INCRV(session, log_bytes_written, record->size);
+ WT_STAT_CONN_INCRV(session, log_bytes_written, record->size);
if (lsnp != NULL) {
*lsnp = myslot->slot->slot_start_lsn;
lsnp->l.offset += (uint32_t)myslot->offset;
@@ -774,7 +774,7 @@ __log_alloc_prealloc(WT_SESSION_IMPL *session, uint32_t to_num)
__wt_verbose(session, WT_VERB_LOG,
"log_alloc_prealloc: rename log %s to %s",
(const char *)from_path->data, (const char *)to_path->data);
- WT_STAT_FAST_CONN_INCR(session, log_prealloc_used);
+ WT_STAT_CONN_INCR(session, log_prealloc_used);
/*
* All file setup, writing the header and pre-allocation was done
* before. We only need to rename it.
@@ -813,7 +813,7 @@ __log_newfile(WT_SESSION_IMPL *session, bool conn_open, bool *created)
*/
WT_ASSERT(session, F_ISSET(session, WT_SESSION_LOCKED_SLOT));
for (yield_cnt = 0; log->log_close_fh != NULL;) {
- WT_STAT_FAST_CONN_INCR(session, log_close_yields);
+ WT_STAT_CONN_INCR(session, log_close_yields);
__wt_log_wrlsn(session, NULL);
if (++yield_cnt > 10000)
return (EBUSY);
@@ -859,8 +859,7 @@ __log_newfile(WT_SESSION_IMPL *session, bool conn_open, bool *created)
if (ret == 0)
create_log = false;
else {
- WT_STAT_FAST_CONN_INCR(
- session, log_prealloc_missed);
+ WT_STAT_CONN_INCR(session, log_prealloc_missed);
if (conn->log_cond != NULL)
__wt_cond_auto_signal(
session, conn->log_cond);
@@ -1411,7 +1410,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
* Wait for earlier groups to finish, otherwise there could
* be holes in the log file.
*/
- WT_STAT_FAST_CONN_INCR(session, log_release_write_lsn);
+ WT_STAT_CONN_INCR(session, log_release_write_lsn);
while (__wt_log_cmp(&log->write_lsn, &slot->slot_release_lsn) != 0) {
/*
* If we're on a locked path and the write LSN is not advancing,
@@ -1485,8 +1484,8 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
fsync_duration_usecs =
WT_TIMEDIFF_US(fsync_stop, fsync_start);
log->sync_dir_lsn = sync_lsn;
- WT_STAT_FAST_CONN_INCR(session, log_sync_dir);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCR(session, log_sync_dir);
+ WT_STAT_CONN_INCRV(session,
log_sync_dir_duration, fsync_duration_usecs);
}
@@ -1500,13 +1499,13 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
"/%" PRIu32,
log->log_fh->name,
sync_lsn.l.file, sync_lsn.l.offset);
- WT_STAT_FAST_CONN_INCR(session, log_sync);
+ WT_STAT_CONN_INCR(session, log_sync);
WT_ERR(__wt_epoch(session, &fsync_start));
WT_ERR(__wt_fsync(session, log->log_fh, true));
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs =
WT_TIMEDIFF_US(fsync_stop, fsync_start);
- WT_STAT_FAST_CONN_INCRV(session,
+ WT_STAT_CONN_INCRV(session,
log_sync_duration, fsync_duration_usecs);
log->sync_lsn = sync_lsn;
__wt_cond_signal(session, log->log_sync_cond);
@@ -1745,7 +1744,7 @@ advance:
WT_ERR(__wt_buf_grow(session, buf, rdup_len));
WT_ERR(__wt_read(session, log_fh,
rd_lsn.l.offset, (size_t)rdup_len, buf->mem));
- WT_STAT_FAST_CONN_INCR(session, log_scan_rereads);
+ WT_STAT_CONN_INCR(session, log_scan_rereads);
}
/*
* We read in the record, verify checksum.
@@ -1787,7 +1786,7 @@ advance:
* We have a valid log record. If it is not the log file
* header, invoke the callback.
*/
- WT_STAT_FAST_CONN_INCR(session, log_scan_records);
+ WT_STAT_CONN_INCR(session, log_scan_records);
next_lsn = rd_lsn;
next_lsn.l.offset += rdup_len;
if (rd_lsn.l.offset != 0) {
@@ -1828,7 +1827,7 @@ advance:
WT_ERR(__log_truncate(session,
&rd_lsn, WT_LOG_FILENAME, 0));
-err: WT_STAT_FAST_CONN_INCR(session, log_scans);
+err: WT_STAT_CONN_INCR(session, log_scans);
/*
* If the first attempt to read a log record results in
* an error recovery is likely going to fail. Try to provide
@@ -1875,13 +1874,13 @@ __wt_log_force_write(WT_SESSION_IMPL *session, bool retry, bool *did_work)
log = S2C(session)->log;
memset(&myslot, 0, sizeof(myslot));
- WT_STAT_FAST_CONN_INCR(session, log_force_write);
+ WT_STAT_CONN_INCR(session, log_force_write);
if (did_work != NULL)
*did_work = true;
myslot.slot = log->active_slot;
joined = WT_LOG_SLOT_JOINED(log->active_slot->slot_state);
if (joined == 0) {
- WT_STAT_FAST_CONN_INCR(session, log_force_write_skip);
+ WT_STAT_CONN_INCR(session, log_force_write_skip);
if (did_work != NULL)
*did_work = false;
return (0);
@@ -1923,7 +1922,7 @@ __wt_log_write(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
ip = record;
if ((compressor = conn->log_compressor) != NULL &&
record->size < log->allocsize) {
- WT_STAT_FAST_CONN_INCR(session, log_compress_small);
+ WT_STAT_CONN_INCR(session, log_compress_small);
} else if (compressor != NULL) {
/* Skip the log header */
src = (uint8_t *)record->mem + WT_LOG_COMPRESS_SKIP;
@@ -1968,13 +1967,13 @@ __wt_log_write(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
if (compression_failed ||
result_len / log->allocsize >=
record->size / log->allocsize)
- WT_STAT_FAST_CONN_INCR(session,
+ WT_STAT_CONN_INCR(session,
log_compress_write_fails);
else {
- WT_STAT_FAST_CONN_INCR(session, log_compress_writes);
- WT_STAT_FAST_CONN_INCRV(session, log_compress_mem,
+ WT_STAT_CONN_INCR(session, log_compress_writes);
+ WT_STAT_CONN_INCRV(session, log_compress_mem,
record->size);
- WT_STAT_FAST_CONN_INCRV(session, log_compress_len,
+ WT_STAT_CONN_INCRV(session, log_compress_len,
result_len);
/*
@@ -2056,7 +2055,7 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
* that we can write the full amount. Do this whether or not
* direct_io is in use because it makes the reading code cleaner.
*/
- WT_STAT_FAST_CONN_INCRV(session, log_bytes_payload, record->size);
+ WT_STAT_CONN_INCRV(session, log_bytes_payload, record->size);
rdup_len = __wt_rduppo2((uint32_t)record->size, log->allocsize);
WT_ERR(__wt_buf_grow(session, record, rdup_len));
WT_ASSERT(session, record->data == record->mem);
@@ -2083,7 +2082,7 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp,
logrec->checksum = __wt_bswap32(logrec->checksum);
#endif
- WT_STAT_FAST_CONN_INCR(session, log_writes);
+ WT_STAT_CONN_INCR(session, log_writes);
__wt_log_slot_join(session, rdup_len, flags, &myslot);
/*