#include "w_defines.h"
#include <cassert>
#include "w.h"
#include "sm_base.h"
#include "w_bitvector.h"
#include <mutex>
#include <memory>
#include <list>
#include "timeout.h"
#include "latches.h"
#include "logrec.h"
#include "smstats.h"
Go to the source code of this file.
§ ADD_TSTAT
Increment statistic named x by y.
§ GET_TSTAT
Get per-thread statistic named x.
§ INC_TSTAT
Increment per-thread statistic named x by y.
§ SET_TSTAT
Set per-thread statistic named x to y.
§ atomic_thread_map_t
Fingerprint for this smthread.
skip
Each smthread_t has a fingerprint. This is used by the deadlock detector. The fingerprint is a bitmap; each thread's bitmap is unique, the deadlock detector ORs fingerprints together to make a "digest" of the waits-for-map. Rather than have fingerprints associated with transactions, we associate them with threads.
This class provides synchronization (protection) for updating the map.
- Note
- : If you want to be sure the fingerprints are unique, for the purpose of eliminating false-positives in the lock manager's deadlock detector while debugging something, look at the code in smthread_t::_initialize_fingerprint(), where you can enable some debugging code. (There is no need to make them unique – if there were, we'd use 1 bit per... – but if you are debugging something you might want to ensure or detect uniqueness for that purpose.)
§ xct()