int numTransCommit = 0;
int numTransAbort = 0;
int nSoftAbort = 0;
+int nSoftAbortCommit = 0;
+int nSoftAbortAbort = 0;
#endif
* ================================================================
*/
int transCommit() {
+#ifdef TRANSSTATS
+ int softaborted=0;
+#endif
do {
/* Look through all the objects in the transaction hash table */
int finalResponse = traverseCache();
if(finalResponse == TRANS_ABORT) {
#ifdef TRANSSTATS
numTransAbort++;
+ if (softaborted) {
+ nSoftAbortAbort++;
+ }
#endif
freenewobjs();
objstrDelete(t_cache);
if(finalResponse == TRANS_COMMIT) {
#ifdef TRANSSTATS
numTransCommit++;
+ if (softaborted) {
+ nSoftAbortCommit++;
+ }
#endif
freenewobjs();
objstrDelete(t_cache);
if(finalResponse == TRANS_SOFT_ABORT) {
#ifdef TRANSSTATS
nSoftAbort++;
+ softaborted=1;
#endif
randomdelay();
} else {
extern int numTransCommit;
extern int numTransAbort;
extern int nSoftAbort;
+extern int nSoftAbortAbort;
+extern int nSoftAbortCommit;
#endif
/* ================================
#define NUMPTRS 100
-#define INITIALHEAPSIZE 128*1024*1024
+#define INITIALHEAPSIZE 16*1024*1024
#define GCPOINT(x) ((int)((x)*0.95))
/* This define takes in how full the heap is initially and returns a new heap size to use */
#define HEAPSIZE(x,y) ((int)(x+y))*2
if (c_table!=NULL) {
fixtable(&c_table, c_size);
fixobjlist(newobjs);
- memorybase=NULL;
}
+ memorybase=NULL;
#endif
/* Check current stack */
if ((*listptr->tc_table)!=NULL) {
fixtable(listptr->tc_table, listptr->tc_size);
fixobjlist(listptr->objlist);
- (*listptr->base)=NULL;
}
+ *(listptr->base)=NULL;
#endif
stackptr=listptr->stackptr;
listptr=listptr->next;
printf("numTransCommit = %d\n", numTransCommit);
printf("numTransAbort = %d\n", numTransAbort);
printf("nSoftAbort = %d\n", nSoftAbort);
+#ifdef STM
+ printf("nSoftAbortCommit = %d\n", nSoftAbortCommit);
+ printf("nSoftAbortAbort = %d\n", nSoftAbortAbort);
+#endif
#endif
exit(___status___);
}
#endif
int byteread=-1;
- // printf("Doing read on %d\n",fd);
do {
byteread=read(fd, charstr, length);
} while(byteread==-1&&errno==EINTR);