Skip to content

Commit c9e1ae0

Browse files
author
tanabe takayuki
committed
ERMIA, MOCC, SS2PL
ERMIA : Makefile に KEY_SORT define 追加. MOCC : KEY_SORT を mocc.cc から削除. SS2PL : 上に同じ. ccbench/include/util.hh の makeProcedure に KEY_SORT ディレクティブ追加.
1 parent 16afa74 commit c9e1ae0

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ermia/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ include $(REL)Makefile
66
ERMIA_ALLSRC = $(ERMIA_SRCS1) $(wildcard include/*.hh)
77

88
KEY_SIZE=8
9-
VAL_SIZE=4
9+
VAL_SIZE=10000
1010
ADD_ANALYSIS=1
11-
BACK_OFF=1
11+
BACK_OFF=0
12+
KEY_SORT=0
1213
MASSTREE_USE=1
1314

1415
CC = g++
@@ -20,6 +21,7 @@ CFLAGS = -c -pipe -g -O3 -std=c++17 -march=native \
2021
-DVAL_SIZE=$(VAL_SIZE) \
2122
-DADD_ANALYSIS=$(ADD_ANALYSIS) \
2223
-DBACK_OFF=$(BACK_OFF) \
24+
-DKEY_SORT=$(KEY_SORT) \
2325
-DMASSTREE_USE=$(MASSTREE_USE) \
2426

2527
LDFLAGS = -L../third_party/mimalloc/out/release

include/util.hh

+5
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ inline void makeProcedure(std::vector<Procedure> &pro, Xoroshiro128Plus &rnd,
118118

119119
(*pro.begin()).ronly_ = ronly_flag;
120120
(*pro.begin()).wonly_ = wonly_flag;
121+
122+
#if KEY_SORT
123+
std::sort(pro.begin(), pro.end());
124+
#endif // KEY_SORT
125+
121126
#if ADD_ANALYSIS
122127
res.local_make_procedure_latency_ += rdtscp() - start;
123128
#endif

mocc/mocc.cc

-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ void worker(size_t thid, char& ready, const bool& start, const bool& quit,
6363
while (!loadAcquire(quit)) {
6464
makeProcedure(trans.pro_set_, rnd, zipf, TUPLE_NUM, MAX_OPE, THREAD_NUM,
6565
RRATIO, RMW, YCSB, false, thid, myres);
66-
#if KEY_SORT
67-
sort(trans.pro_set_.begin(), trans.pro_set_.end());
68-
#endif
6966
RETRY:
7067
if (thid == 0) {
7168
leaderWork(epoch_timer_start, epoch_timer_stop, myres);

ss2pl/ss2pl.cc

-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ void worker(size_t thid, char& ready, const bool& start, const bool& quit,
6565
while (!loadAcquire(quit)) {
6666
makeProcedure(trans.pro_set_, rnd, zipf, TUPLE_NUM, MAX_OPE, THREAD_NUM,
6767
RRATIO, RMW, YCSB, false, thid, myres);
68-
#if KEY_SORT
69-
std::sort(trans.pro_set_.begin(), trans.pro_set_.end());
70-
#endif
71-
7268
RETRY:
7369
if (loadAcquire(quit)) break;
7470
if (thid == 0) leaderBackoffWork(backoff, res);

0 commit comments

Comments
 (0)