11 #ifndef POLICIES_HPP__
12 #define POLICIES_HPP__
14 #include <stm/config.h>
123 if (
this != profile) {
139 printf(
"Profile: read_ro=%d, read_rw_nonraw=%d, read_rw_raw=%d, "
140 "write_nonwaw=%d, write_waw=%d, txn_time=%llu\n",
165 for (
int i = 0; i < num; ++i) {
288 uint32_t commits = 1;
289 unsigned long long nontxn_time = 0;
296 unsigned long long ans = 1 + (nontxn_time / commits);
302 int32_t abortThresh, int32_t waitThresh,
303 bool isDynamic,
bool isCBR,
304 bool isCommitProfile, uint32_t (*decider)()
TM_FASTCALL,
309 #endif // POLICIES_HPP__
Definition: policies.hpp:262
Definition: policies.hpp:267
int startmode
Definition: policies.hpp:39
TxThread * threads[MAX_THREADS]
Definition: txthread.cpp:56
void clear()
Definition: policies.hpp:148
bool abort_switch
Definition: policies.hpp:78
Definition: stm_fraser.c:61
Definition: policies.hpp:261
Definition: policies.hpp:260
Definition: policies.hpp:33
dynprof_t()
Definition: policies.hpp:112
bool isCBR
Definition: policies.hpp:49
int read_ro
Definition: policies.hpp:94
int abortThresh
Definition: policies.hpp:82
Definition: policies.hpp:267
Definition: policies.hpp:256
Definition: policies.hpp:66
static void doavg(dynprof_t &dest, dynprof_t *list, int num)
Definition: policies.hpp:159
dynprof_t & operator=(const dynprof_t *profile)
Definition: policies.hpp:121
Definition: policies.hpp:265
Definition: policies.hpp:260
dynprof_t p
Definition: policies.hpp:215
pol_t pols[POL_MAX]
Definition: policies.cpp:107
Definition: policies.hpp:261
Definition: policies.hpp:252
qtable_t()
Definition: policies.hpp:235
Definition: policies.hpp:92
void dump()
Definition: policies.hpp:137
volatile uintptr_t val
Definition: metadata.hpp:117
Definition: policies.hpp:263
int txn_ratio
Definition: policies.hpp:224
uint64_t txn_time
Definition: policies.hpp:100
pol_t()
Definition: policies.hpp:58
int thr
Definition: policies.hpp:232
Definition: policies.hpp:265
uint32_t POL_ID
Definition: policies.hpp:69
Definition: policies.hpp:263
Definition: policies.hpp:262
int write_waw
Definition: policies.hpp:98
Definition: policies.hpp:266
pad_word_t threadcount
Definition: WBMMPolicy.hpp:35
Definition: policies.hpp:261
Definition: policies.hpp:190
uint32_t num_ro
Definition: txthread.hpp:56
MiniVector< qtable_t > * qtbl[MAX_THREADS+1]
Definition: policies.cpp:111
Definition: policies.hpp:262
Definition: policies.hpp:268
Definition: policies.hpp:270
Definition: policies.hpp:258
Definition: policies.hpp:260
Definition: policies.hpp:256
bool isCommitProfile
Definition: policies.hpp:52
Definition: policies.hpp:263
POLS
Definition: policies.hpp:250
Definition: policies.hpp:256
Definition: policies.hpp:262
behavior_t curr_policy
Definition: policies.cpp:108
Definition: policies.hpp:266
Definition: policies.hpp:254
Definition: policies.hpp:263
Definition: policies.hpp:264
int pad
Definition: policies.hpp:99
uint64_t total_nontxn_time
Definition: txthread.hpp:93
uint32_t num_commits
Definition: txthread.hpp:53
bool isDynamic
Definition: policies.hpp:46
volatile uint32_t ALG_ID
Definition: policies.hpp:72
Definition: policies.hpp:264
int waitThresh
Definition: policies.hpp:83
int pol_name_map(const char *phasename)
Definition: policies.cpp:114
Definition: policies.hpp:260
int waitThresh
Definition: policies.hpp:43
Definition: policies.hpp:264
static const unsigned MAX_THREADS
Definition: metadata.hpp:33
Definition: policies.hpp:267
int alg_name
Definition: policies.hpp:200
uint32_t PREPROFILE_ALG
Definition: policies.hpp:75
uint32_t(* TM_FASTCALL)()
Definition: policies.hpp:55
int write_nonwaw
Definition: policies.hpp:97
Definition: policies.hpp:261
TM_INLINE unsigned long long get_nontxtime()
Definition: policies.hpp:285
Definition: policies.hpp:266
void init_adapt_pol(uint32_t PolicyID, int32_t startmode, int32_t abortThresh, int32_t waitThresh, bool isDynamic, bool isCBR, bool isCommitProfile, uint32_t TM_FASTCALL(*decider)(), const char *name)
Definition: policies.cpp:130
uint64_t timecounter
Definition: policies.hpp:101
void pol_init(const char *mode)
Definition: policies.cpp:148
int abortThresh
Definition: policies.hpp:42
int read_rw_nonraw
Definition: policies.hpp:95
Definition: policies.hpp:264
int pct_ro
Definition: policies.hpp:229
int read_rw_raw
Definition: policies.hpp:96
Definition: policies.hpp:265
Definition: policies.hpp:256
const char * name
Definition: policies.hpp:36