Changeset: b3355bab0b12 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3355bab0b12
Modified Files:
        gdk/gdk_cbp.c
        gdk/gdk_col.c
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_runtime.c
        monetdb5/modules/mal/groupby.c
        monetdb5/optimizer/Makefile.ag
        monetdb5/optimizer/opt_inline.c
        monetdb5/optimizer/opt_mitosis.c
        monetdb5/optimizer/opt_reorder.c
Branch: headless
Log Message:

Minor changes to get the headless to compile again.


diffs (204 lines):

diff --git a/gdk/gdk_cbp.c b/gdk/gdk_cbp.c
--- a/gdk/gdk_cbp.c
+++ b/gdk/gdk_cbp.c
@@ -967,7 +967,7 @@
        if (bs->type != TYPE_void) {
                if (lstat(bufhead, &st) < 0) {
                        GDKerror("CBPimportEntry: file '%s' does not exist.\n", 
bufhead);
-                       CBPdestroy(bn);
+                       CBPdestroy(bs);
                        return 0;
                }
                GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid), "tail");
@@ -988,7 +988,7 @@
                if (bs->varsized) {
                        if (lstat(bufhheap, &st) < 0) {
                                GDKerror("CBPimportEntry: file '%s' does not 
exist.\n", bufhheap);
-                               CBPdestroy(bn);
+                               CBPdestroy(bs);
                                return 0;
                        }
                        GDKfilepath(path, COLDIR, CBP_physical(bs->cacheid), 
"theap");
diff --git a/gdk/gdk_col.c b/gdk/gdk_col.c
--- a/gdk/gdk_col.c
+++ b/gdk/gdk_col.c
@@ -1697,13 +1697,13 @@
        if (hb >= 0 && sz > 0 &&
            b->heap.base && b->heap.storage != STORE_MEM &&
            MT_madvise(b->heap.base, sz, BUF_TO_MMAP[hb])) {
-               IODEBUG THRprintf(GDKout, "madvise(%x, " SZFMT ", %d) on 
b->heap hb failed\n", b->heap.base, sz, hb);
+               IODEBUG THRprintf(GDKout, "madvise(" PTRFMT ", " SZFMT ", %d) 
on b->heap hb failed\n", PTRFMTCAST b->heap.base, sz, hb);
                return GDK_FAIL;
        }
        if (hhp >= 0 && b->vheap && vsz > 0 &&
            b->vheap->base && b->vheap->storage != STORE_MEM &&
            MT_madvise(b->vheap->base, vsz, BUF_TO_MMAP[hhp])) {
-               IODEBUG THRprintf(GDKout, "madvise(%x, " SZFMT ", %d) on 
b->vheap hhp failed\n", b->vheap->base, vsz, hhp);
+               IODEBUG THRprintf(GDKout, "madvise(" PTRFMT ", " SZFMT ", %d) 
on b->vheap hhp failed\n", PTRFMTCAST b->vheap->base, vsz, hhp);
                return GDK_FAIL;
        }
        return GDK_SUCCEED;
diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -754,7 +754,7 @@
                queued++;
                flow->status[i].state = DFLOWrunning;
                PARDEBUG 
-                       mnstr_printf(GDKstdout,"#enqueue pc=%d claim=%d queue 
%d\n", flow->status[i].pc, flow->status[i].argclaim,queued);
+                       mnstr_printf(GDKstdout,"#enqueue pc=%d claim=" LLFMT " 
queue %d\n", flow->status[i].pc, flow->status[i].argclaim,queued);
                q_enqueue_(flow->todo, flow->status + i);
        }
        MT_lock_unset(&flow->todo->l, "q_enqueue");
@@ -814,7 +814,7 @@
                                q_enqueue_(flow->todo, flow->status + i);
                                flow->status[i].state = DFLOWrunning;
                                PARDEBUG 
-                                       mnstr_printf(GDKstdout,"#enqueue pc=%d 
claim=%d\n", flow->status[i].pc, flow->status[i].argclaim);
+                                       mnstr_printf(GDKstdout,"#enqueue pc=%d 
claim=" LLFMT "\n", flow->status[i].pc, flow->status[i].argclaim);
                        } else
                        if ( ret == MAL_SUCCEED )
                        PARDEBUG
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -1136,7 +1136,7 @@
                                mnstr_printf(out,"CBP contains %d 
entries\n",limit);
                                for (; i < limit; i++)
                                        if ( ( CBP[i].lrefs || CBP[i].refs) && 
CBP[i].b ){
-                                               mnstr_printf(out,"#[%d] 
%-15s",i,CBP[i].nme[0]);
+                                               mnstr_printf(out,"#[%d] 
%-15s",i,CBP[i].nme);
                                                if ( CBP[i].b)
                                                        printCOLproperties(out, 
CBP[i].b);
                                                if( (*b=='d' && CBP_refs(i)==0) 
 || CBP_cache(i) == 0){
@@ -1972,7 +1972,7 @@
                        h= b->hash;
                        if(h && h->mask){
                                        mnstr_printf(out,"\thash=" PTRFMT " 
size=" SZFMT "\n",PTRFMTCAST h, sizeof(*h));
-                                       mnstr_printf(out,"\thashlink=" OIDFMT " 
size=" SZFMT "\n",h->link,
+                                       mnstr_printf(out,"\thashlink=" PTRFMT " 
size=" SZFMT "\n",PTRFMTCAST h->link,
                                                        
(h->mask+h->lim+1)*sizeof(int));
                        }
                        CBPunfix(b->cacheid);
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
@@ -345,19 +345,19 @@
                                throw(MAL, "mal.interpreter", MAL_STACK_FAIL);
                }
        }
-@-
-An optimization is to copy all constant variables used in functions immediately
-onto the value stack. Then we do not have to check for their location
-later on any more. At some point, the effect is optimal, if at least several
-constants are referenced in a function (a gain on tst400a of 20% has been
-observed due the small size of the function).
-@c
+/*
+ * An optimization is to copy all constant variables used in functions 
immediately
+ * onto the value stack. Then we do not have to check for their location
+ * later on any more. At some point, the effect is optimal, if at least several
+ * constants are referenced in a function (a gain on tst400a of 20% has been
+ * observed due the small size of the function).
+ */
        if (env && mbcaller) {
-               @:initStack(0)@
+               initStack(mb, stk, 0);
        } else if (env && env->stkbot) {
-               @:initStack(env->stkbot)@
+               initStack(mb, stk, env->stkbot);
        } else {
-               @:initStack(0)@
+               initStack(mb, stk, 0);
        }
 
        if (env && mbcaller) {
diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c
--- a/monetdb5/mal/mal_module.c
+++ b/monetdb5/mal/mal_module.c
@@ -355,7 +355,7 @@
                if( getFunctionId(pci)==s->name && pci->argc == 
getSignature(s)->argc ){
                        /* found it check argtypes */
                        for( fnd=1, i = 0; i < pci->argc; i++)
-                               if ( getArgType(mb,pci,i) != 
getArgType(s->def,getSignature(s),i))
+                               if (!CMPMALtype(getArgType(mb,pci,i), 
getArgType(s->def,getSignature(s),i)))
                                        fnd = 0;
                        if( fnd) 
                                return 1;
diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c
--- a/monetdb5/mal/mal_runtime.c
+++ b/monetdb5/mal/mal_runtime.c
@@ -106,9 +106,9 @@
                if( cntxt-> flags & ioFlag){
                        struct  rusage resource;
                        getrusage(RUSAGE_SELF, &resource);
-                       mnstr_printf(cntxt->fdout," %3d R",
+                       mnstr_printf(cntxt->fdout," %3ld R",
                                resource.ru_inblock);
-                       mnstr_printf(cntxt->fdout," %3d W ",
+                       mnstr_printf(cntxt->fdout," %3ld W ",
                                resource.ru_oublock);
                }
        #endif
diff --git a/monetdb5/modules/mal/groupby.c b/monetdb5/modules/mal/groupby.c
--- a/monetdb5/modules/mal/groupby.c
+++ b/monetdb5/modules/mal/groupby.c
@@ -131,7 +131,7 @@
        }
 #ifdef _DEBUG_GROUPBY_
        for(i=0; i<a->last; i++)
-               mnstr_printf(cntxt->fdout,"#group %d estimate "BUNFMT "\n", i, 
a->estimate[i]);
+               mnstr_printf(cntxt->fdout,"#group %d estimate "OIDFMT "\n", i, 
a->estimate[i]);
 #endif
        /* get iterator stuff ready as well */
        for(i=0; i<a->last; i++)
diff --git a/monetdb5/optimizer/Makefile.ag b/monetdb5/optimizer/Makefile.ag
--- a/monetdb5/optimizer/Makefile.ag
+++ b/monetdb5/optimizer/Makefile.ag
@@ -54,7 +54,7 @@
                opt_mitosis.c \
                opt_multiplex.c \
 #              opt_octopus.c \
-               opt_origin.c \
+#              opt_origin.c \
                opt_pipes.c \
                opt_prejoin.c \
                opt_prelude.c \
diff --git a/monetdb5/optimizer/opt_inline.c b/monetdb5/optimizer/opt_inline.c
--- a/monetdb5/optimizer/opt_inline.c
+++ b/monetdb5/optimizer/opt_inline.c
@@ -109,7 +109,7 @@
                }
        }
        (void)stk;
-       OPTDEBUGinline
+       OPTDEBUGoptimizer
                mnstr_printf(cntxt->fdout,"#mal program: %d MAL instr %d vars 
(" SZFMT " K)\n",mb->stop,mb->vtop,
                ((sizeof( MalBlkRecord) +mb->ssize * sizeof(InstrRecord)+ 
mb->vtop* sizeof(VarRecord) + mb->vsize*sizeof(VarPtr)+1023)/1024));
        DEBUGoptimizers
diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -127,7 +127,9 @@
 /*
        if ( (i = OPTlegAdviceInternal(mb,stk,p)) > 0 )
                pieces = i;
-       else {
+       else
+*/
+       {
                /* ensure that GDKnr_threads partitions fit into main memory */
                r = (oid) (monet_memory / typewidth / threads);
                if (rowcnt > r)
diff --git a/monetdb5/optimizer/opt_reorder.c b/monetdb5/optimizer/opt_reorder.c
--- a/monetdb5/optimizer/opt_reorder.c
+++ b/monetdb5/optimizer/opt_reorder.c
@@ -78,7 +78,7 @@
 OPTdependencies(Client cntxt, MalBlkPtr mb, int **Ulist){
        Node *list = (Node *) GDKzalloc(sizeof(Node) * mb->stop);
        int *var = (int*) GDKzalloc(sizeof(int) * mb->vtop), *uselist = NULL;
-       int i,j,sz=0;
+       int i,j/*,sz=0*/;
        InstrPtr p = NULL;
        int block = 0;
        
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to