Changeset: c0d7ea83e91f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c0d7ea83e91f
Modified Files:
        monetdb5/optimizer/opt_multicore.c
        monetdb5/scheduler/mut_policy.c
        monetdb5/scheduler/mut_select.c
        monetdb5/scheduler/run_multicore.c
Branch: mutation
Log Message:

Minor administrative changes


diffs (70 lines):

diff --git a/monetdb5/optimizer/opt_multicore.c 
b/monetdb5/optimizer/opt_multicore.c
--- a/monetdb5/optimizer/opt_multicore.c
+++ b/monetdb5/optimizer/opt_multicore.c
@@ -37,6 +37,8 @@ OPTmulticoreImplementation(Client cntxt,
        if (varGetProp(mb, getArg(mb->stmt[0], 0), inlineProp) != NULL)
                return 0;
 
+       // introduce playground for runtime plan modifications
+       resizeMalBlk(mb, 2 * mb->ssize, 2 * mb->vsize);
        newStmt(mb,schedulerRef,multicoreRef);
        moveInstruction(mb, mb->stop-1,1);
        pci = getInstrPtr(mb,1);
diff --git a/monetdb5/scheduler/mut_policy.c b/monetdb5/scheduler/mut_policy.c
--- a/monetdb5/scheduler/mut_policy.c
+++ b/monetdb5/scheduler/mut_policy.c
@@ -168,13 +168,11 @@ str
 MUTpolicy(Client cntxt, Mutant m) 
 {
        int r;
-       MalBlkPtr mb = m->src;
-       /* Check if you have enough space for expansion of the MAL statements 
and variables */
-       if( mb->vsize - mb->vtop < mb->vtop)
-               resizeMalBlk(mb, mb->ssize  * 2, mb->vsize * 2);
 
        /* we take a single mutation attempt, later to be adjusted */
        r = MUTpolicyBaseline(cntxt, m);
+       DEBUG_MULTICORE
+               mnstr_printf(cntxt->fdout,"POLICY result %d\n",r);
        if ( r < 0)
                throw(MAL,"run_multicore","Baseline error");
        return MAL_SUCCEED;
diff --git a/monetdb5/scheduler/mut_select.c b/monetdb5/scheduler/mut_select.c
--- a/monetdb5/scheduler/mut_select.c
+++ b/monetdb5/scheduler/mut_select.c
@@ -88,10 +88,6 @@ mutationSelect(Client cntxt, Mutant m){
         p= old[i];
                if ( i == pc){
 
-                       if ( m->stk->stksize < m->src->vtop + 5){
-                               pushInstruction(m->src,p);
-                               continue;
-                       }
                        profiler = m->src->profiler[i].trace;
 
                        v1 = mutationSelect_(m->src, m->stk, p, 2, 0, profiler);
diff --git a/monetdb5/scheduler/run_multicore.c 
b/monetdb5/scheduler/run_multicore.c
--- a/monetdb5/scheduler/run_multicore.c
+++ b/monetdb5/scheduler/run_multicore.c
@@ -49,7 +49,7 @@ RUNmulticore(Client cntxt, MalBlkPtr mb,
                setFilterAll();
                mb->mutants = (void*) mutant;
        } else
-       if (MUTshouldrun(mb) ){
+       if (MUTshouldrun(mb) && mb->vsize - mb->vtop >10 && mb->ssize - 
mb->stop >10){
                // Keep old version in a mutant history 
                mutant->threshold = MUT_THRESHOLD; 
                mutant->next = ((Mutant)mb->mutants);
@@ -66,9 +66,11 @@ RUNmulticore(Client cntxt, MalBlkPtr mb,
                        GDKfree(mutant);
                        return msg;
                }
+               // this relies on the multicore operation to be the first !!
+               trimMalVariables(mb,stk);
        }
        clk = GDKusec();
-       msg = runMALsequence(cntxt, mb, 2, mb->stop, stk,0, 0 );
+       msg = runMALsequence(cntxt, mb, 2, mb->stop, stk, 0, 0 );
        mutant->runtime += GDKusec()- clk;
        mutant->totalQueryTime = GDKusec() - clkInit;
        mutant->calls++;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to