Changeset: d22d5424a2f5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d22d5424a2f5
Modified Files:
monetdb5/scheduler/mut_pack.c
monetdb5/scheduler/mut_policy.c
monetdb5/scheduler/run_multicore.c
Branch: mutation
Log Message:
Include shuffles over sql.{subdelta,projectdelta}
diffs (94 lines):
diff --git a/monetdb5/scheduler/mut_pack.c b/monetdb5/scheduler/mut_pack.c
--- a/monetdb5/scheduler/mut_pack.c
+++ b/monetdb5/scheduler/mut_pack.c
@@ -91,11 +91,14 @@ mutationPack(Client cntxt, Mutant m){
old[i] = p;
pc = i;
}
+ DEBUG_MULTICORE{
+ mnstr_printf(cntxt->fdout," to %d\n",i-1);
+
printInstruction(cntxt->fdout,mb,0,old[i],LIST_MAL_ALL);
+ }
packpc = pc;
newpack = p;
old[pc]= 0;
- DEBUG_MULTICORE mnstr_printf(cntxt->fdout," to
%d\n",i-1);
q = old[i];
if (getModuleId(q) == batRef && getFunctionId(q) ==
partitionRef && getArgPos(q,mvar) >=0){
// we bounced upon a partition over a packed variable
@@ -145,8 +148,8 @@ mutationPack(Client cntxt, Mutant m){
{
if (getModuleId(p) == algebraRef)
{
- newpack1 = copyInstruction(newpack);
if (getFunctionId(p) == joinRef ||
getFunctionId(p)== leftjoinRef || getFunctionId(p) == subselectRef){
+ newpack1 = copyInstruction(newpack);
getArg(newpack1,0) = getArg(p,0);
setArgType(mb, newpack1, 0,
getArgType(mb,p,0));
if( getFunctionId(p) == joinRef ){
@@ -175,6 +178,25 @@ mutationPack(Client cntxt, Mutant m){
modified++;
continue;
}
+ }
+ if( getModuleId(p) == sqlRef &&
+ (getFunctionId(p) == subdeltaRef || getFunctionId(p)
== projectdeltaRef)){
+ newpack1 = copyInstruction(newpack);
+ getArg(newpack1,0) = getArg(p,0);
+ setArgType(mb, newpack1, 0,
getArgType(mb,p,0));
+
+ for( j= newpack->retc; j
<newpack->argc; j++){
+ q= copyInstruction(p);
+ getArg(q,getArgPos(q,mvar)) =
getArg(newpack,j);
+ getArg(q,0) =
newTmpVariable(mb, getArgType(mb, q, 0));
+ getArg(newpack1,j)= getArg(q,0);
+ pushInstruction(mb,q);
+ mb->profiler[mb->stop-1].trace
= profiler;
+ }
+ pushInstruction(mb, newpack1);
+ newpack1 = 0;
+ modified++;
+ continue;
}
pushInstruction(mb, p);
} else
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
@@ -129,6 +129,10 @@ MUTpolicyBaseline(Client cntxt, Mutant m
else
if ( getModuleId(p) == matRef && getFunctionId(p) == packRef)
modified = mutationPack(cntxt,m);
+ //else
+ //if ( getModuleId(p) == sqlRef && ( getFunctionId(p) ==
subdeltaRef || getFunctionId(p) == projectdeltaRef))
+ //modified = mutationSQL(cntxt,m);
+
DEBUG_MULTICORE
mnstr_printf(cntxt->fdout, "#MODIFIED %s modified %d
threshold "LLFMT" cost"LLFMT" %s\n",
(modified>0? getFunctionId(p):""),modified,
threshold, mb->profiler[m->target].ticks/mb->calls, m->comment);
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
@@ -66,8 +66,6 @@ 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 );
@@ -88,10 +86,11 @@ RUNmulticore(Client cntxt, MalBlkPtr mb,
mutant->serialExecTime = mutant->next->serialExecTime;
MUTupdateGlobalMin(mutant);
MUTupdateRateOfFall(cntxt, mutant);
+ trimMalVariables(mb,stk);
}
DEBUG_PRINT_TIME
- mnstr_printf(cntxt->fdout,"# call %d invocation Time "LLFMT"
optimizer " LLFMT"\n",mutant->calls, mutant->runtime, mutant->totalQueryTime -
mutant->runtime);
+ mnstr_printf(cntxt->fdout,"# call %d invocation Time "LLFMT"
optimizer " LLFMT"\n",mb->calls, mutant->runtime, mutant->totalQueryTime -
mutant->runtime);
*ret = 0;
return msg;
}
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list