Changeset: 1062b2df07b3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1062b2df07b3 Modified Files: clients/Tests/exports.stable.out gdk/ChangeLog gdk/gdk.h gdk/gdk_bbp.c gdk/gdk_storage.c monetdb5/mal/Tests/tst275.stable.out monetdb5/mal/mal_interpreter.c monetdb5/modules/kernel/bat5.c Branch: default Log Message:
Removed batStamp from the BAT descriptor. diffs (198 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -177,7 +177,6 @@ BAT *BATunique(BAT *b, BAT *s); BBPrec *BBP[N_BBPINIT]; void BBPaddfarm(const char *dirname, int rolemask); void BBPclear(bat bid); -int BBPcurstamp(void); int BBPdecref(bat b, int logical); BAT *BBPdescriptor(bat b); int BBPin; diff --git a/gdk/ChangeLog b/gdk/ChangeLog --- a/gdk/ChangeLog +++ b/gdk/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Tue Jul 26 2016 Sjoerd Mullender <[email protected]> +- Removed batStamp field from BAT descriptor, and removed the BBPcurstamp + function. + * Fri Jul 22 2016 Sjoerd Mullender <[email protected]> - Removed unused functions BBPhot and BBPcold. diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -795,7 +795,6 @@ gdk_export int VALisnil(const ValRecord typedef struct { /* dynamic bat properties */ MT_Id tid; /* which thread created it */ - int stamp; /* BAT recent creation stamp */ unsigned int copiedtodisk:1, /* once written */ dirty:2, /* dirty wrt disk? */ @@ -884,7 +883,6 @@ typedef struct BATiter { #define batInserted S.inserted #define batCount S.count #define batCapacity S.capacity -#define batStamp S.stamp #define batSharecnt S.sharecnt #define batRestricted S.restricted #define batRole S.role @@ -1702,7 +1700,6 @@ gdk_export BBPrec *BBP[N_BBPINIT]; /* macros that nicely check parameters */ #define BBPcacheid(b) ((b)->batCacheid) #define BBPstatus(i) (BBPcheck((i),"BBPstatus")?BBP_status(i):-1) -gdk_export int BBPcurstamp(void); #define BBPrefs(i) (BBPcheck((i),"BBPrefs")?BBP_refs(i):-1) #define BBPcache(i) (BBPcheck((i),"BBPcache")?BBP_cache(i):(BAT*) NULL) #define BBPname(i) \ diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -181,10 +181,6 @@ getBBPsize(void) /* * other globals */ -#ifdef ATOMIC_LOCK -static MT_Lock BBP_curstampLock MT_LOCK_INITIALIZER("BBP_curstampLock"); -#endif -static volatile ATOMIC_TYPE BBP_curstamp = 0; /* unique stamp for creation of a bat */ int BBP_dirty = 0; /* BBP structures modified? */ int BBPin = 0; /* bats loaded statistic */ int BBPout = 0; /* bats saved statistic */ @@ -1982,12 +1978,6 @@ BBPgetsubdir(str s, bat i) *s = 0; } -int -BBPcurstamp(void) -{ - return ATOMIC_GET(BBP_curstamp, BBP_curstampLock) & 0x7fffffff; -} - /* There are BBP_THREADMASK+1 (64) free lists, and ours (idx) is * empty. Here we find a longish free list (at least 20 entries), and * if we can find one, we take one entry from that list. If no long @@ -2085,7 +2075,6 @@ BBPinsert(BAT *bn) /* fill in basic BBP fields for the new bat */ - bn->batStamp = ATOMIC_INC(BBP_curstamp, BBP_curstampLock) & 0x7fffffff; bn->batCacheid = i; bn->creator_tid = MT_getpid(); @@ -3754,7 +3743,6 @@ gdk_bbp_reset(void) BBP_mask = 0; stamp = 0; - BBP_curstamp = 0; BBP_dirty = 0; BBPin = 0; BBPout = 0; diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -607,9 +607,6 @@ DESCload(int i) } b->ttype = tt; b->thash = NULL; - /* mil shouldn't mess with just loaded bats */ - if (b->batStamp > 0) - b->batStamp = -b->batStamp; /* reconstruct mode from BBP status (BATmode doesn't flush * descriptor, so loaded mode may be stale) */ diff --git a/monetdb5/mal/Tests/tst275.stable.out b/monetdb5/mal/Tests/tst275.stable.out --- a/monetdb5/mal/Tests/tst275.stable.out +++ b/monetdb5/mal/Tests/tst275.stable.out @@ -64,19 +64,17 @@ Ready. [ 27@0, "tnonil", "1" ] [ 28@0, "tnil", "0" ] [ 29@0, "batInserted", "0" ] -[ 32@0, "ttop", "0" ] -[ 33@0, "batStamp", "152" ] -[ 34@0, "lastUsed", "1107" ] -[ 35@0, "curStamp", "154" ] -[ 36@0, "batCopiedtodisk", "0" ] -[ 37@0, "batDirtydesc", "dirty" ] -[ 38@0, "T->heap.dirty", "clean" ] -[ 39@0, "tail.free", "0" ] -[ 40@0, "tail.size", "1024" ] -[ 41@0, "tail.storage", "malloced" ] -[ 42@0, "tail.newstorage", "malloced" ] -[ 43@0, "tail.filename", "22.tail" ] -[ 44@0, "T->vheap->dirty", "clean" ] +[ 30@0, "ttop", "0" ] +[ 31@0, "lastUsed", "1107" ] +[ 32@0, "batCopiedtodisk", "0" ] +[ 33@0, "batDirtydesc", "dirty" ] +[ 34@0, "T->heap.dirty", "clean" ] +[ 35@0, "tail.free", "0" ] +[ 36@0, "tail.size", "1024" ] +[ 37@0, "tail.storage", "malloced" ] +[ 38@0, "tail.newstorage", "malloced" ] +[ 39@0, "tail.filename", "22.tail" ] +[ 40@0, "T->vheap->dirty", "clean" ] #~EndVariableOutput~# #--------------------------# # h t # name diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c --- a/monetdb5/mal/mal_interpreter.c +++ b/monetdb5/mal/mal_interpreter.c @@ -462,7 +462,6 @@ str runMALsequence(Client cntxt, MalBlkP InstrPtr pci = 0; int exceptionVar; str ret = 0, localGDKerrbuf= GDKerrbuf; - int stamp = -1; ValRecord backups[16]; ValPtr backup; int garbages[16], *garbage; @@ -582,7 +581,6 @@ str runMALsequence(Client cntxt, MalBlkP if (i < pci->retc && stk->stk[a].vtype == TYPE_bat) { backup[i] = stk->stk[a]; - stamp = BBPcurstamp(); } else if (i < pci->retc && 0 < stk->stk[a].vtype && stk->stk[a].vtype < TYPE_any && @@ -808,17 +806,9 @@ str runMALsequence(Client cntxt, MalBlkP ret = createException(MAL, "mal.propertyCheck", RUNTIME_OBJECT_MISSING); continue; } - if (b->batStamp <= stamp) { - if (GDKdebug & PROPMASK) { - b = BATdescriptor(stk->stk[getArg(pci, i)].val.bval); - BATassertProps(b); - BBPunfix(b->batCacheid); - } - } else if (GDKdebug & CHECKMASK) { - b = BATdescriptor(stk->stk[getArg(pci, i)].val.bval); - BATassertProps(b); - BBPunfix(b->batCacheid); - } + b = BATdescriptor(stk->stk[getArg(pci, i)].val.bval); + BATassertProps(b); + BBPunfix(b->batCacheid); } } } diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c --- a/monetdb5/modules/kernel/bat5.c +++ b/monetdb5/modules/kernel/bat5.c @@ -806,12 +806,8 @@ BKCinfo(bat *ret1, bat *ret2, const bat BUNappend(bv, local_utoa(b->batInserted), FALSE) != GDK_SUCCEED || BUNappend(bk, "ttop", FALSE) != GDK_SUCCEED || BUNappend(bv, local_utoa(b->theap.free), FALSE) != GDK_SUCCEED || - BUNappend(bk, "batStamp", FALSE) != GDK_SUCCEED || - BUNappend(bv, local_itoa((ssize_t)(b->batStamp)), FALSE) != GDK_SUCCEED || BUNappend(bk, "lastUsed", FALSE) != GDK_SUCCEED || BUNappend(bv, local_itoa((ssize_t)(BBP_lastused(b->batCacheid))), FALSE) != GDK_SUCCEED || - BUNappend(bk, "curStamp", FALSE) != GDK_SUCCEED || - BUNappend(bv, local_itoa((ssize_t)(BBPcurstamp())), FALSE) != GDK_SUCCEED || BUNappend(bk, "batCopiedtodisk", FALSE) != GDK_SUCCEED || BUNappend(bv, local_itoa((ssize_t)(b->batCopiedtodisk)), FALSE) != GDK_SUCCEED || BUNappend(bk, "batDirtydesc", FALSE) != GDK_SUCCEED || _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
