Changeset: 48c5fac4294f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48c5fac4294f
Modified Files:
monetdb5/scheduler/mut_transforms.c
monetdb5/scheduler/run_multicore.c
Branch: mutation
Log Message:
add io.print for join input tracability, delete old join io.print when join
splitted
diffs (134 lines):
diff --git a/monetdb5/scheduler/mut_transforms.c
b/monetdb5/scheduler/mut_transforms.c
--- a/monetdb5/scheduler/mut_transforms.c
+++ b/monetdb5/scheduler/mut_transforms.c
@@ -65,6 +65,11 @@ mutationJoin(Client cntxt, Mutant m){
pushInstruction(m->src,p);
continue;
}
+
+ // make the previous print statement associated with
this algebra.join operator a no-op
+
+
+
profiler = m->src->profiler[i].trace;
q= newStmt(m->src, batRef, partitionRef);
setVarType(m->src, getArg(q,0), getArgType(m->src, p,
p->retc));
@@ -95,7 +100,6 @@ mutationJoin(Client cntxt, Mutant m){
// inherit profiling
m->src->profiler[m->src->stop-1].trace = profiler;
-
q= copyInstruction(p);
getArg(q,2)= b1;
v1 = getArg(q,0)= newTmpVariable(m->src,TYPE_any);
@@ -104,6 +108,11 @@ mutationJoin(Client cntxt, Mutant m){
// inherit profiling
m->src->profiler[m->src->stop-1].trace = profiler;
+ q= newStmt(m->src, ioRef, printRef);
+ q = pushArgument(m->src,q, b1);
+ // inherit profiling
+ m->src->profiler[m->src->stop-1].trace = profiler;
+
q= newStmt(m->src, languageRef, passRef);
q = pushArgument(m->src,q,b1);
// inherit profiling
@@ -117,6 +126,15 @@ mutationJoin(Client cntxt, Mutant m){
// inherit profiling
m->src->profiler[m->src->stop-1].trace = profiler;
+ // to avoid the case of a double push of ioRef and
printRef on an already present algebra.join
+// if (getModuleId(old[i+1]) != ioRef &&
getFunctionId(old[i+1]) != printRef)
+// {
+ q= newStmt(m->src, ioRef, printRef);
+ q = pushArgument(m->src,q, b2);
+ // inherit profiling
+ m->src->profiler[m->src->stop-1].trace =
profiler;
+// }
+
q= newStmt(m->src, languageRef, passRef);
q = pushArgument(m->src,q,b2);
// inherit profiling
@@ -153,17 +171,30 @@ mutationJoin(Client cntxt, Mutant m){
q= pushArgument(m->src,q,v2);
// added support for printing the joined bat
for verification
- //q= newStmt(m->src, ioRef, printRef);
- //q = pushArgument(m->src,q, getArg(p,0));
+ q= newStmt(m->src, ioRef, printRef);
+ q = pushArgument(m->src,q, getArg(p,0));
// inherit profiling
- //m->src->profiler[m->src->stop-1].trace =
profiler;
+ m->src->profiler[m->src->stop-1].trace =
profiler;
+
}
//pushInstruction(m->src,p);
m->target = pc;
m->comment = GDKstrdup("mutationJoin");
} else
- pushInstruction(m->src,p);
+ {
+ pushInstruction(m->src,p);
+ if (getModuleId(p) == algebraRef &&
getFunctionId(p) == joinRef)
+ {
+ // to avoid the case of a double push
of ioRef and printRef on an already present algebra.join
+ if (getModuleId(old[i+1]) != ioRef &&
getFunctionId(old[i+1]) != printRef)
+ {
+ q = newStmt(m->src, ioRef,
printRef);
+ q = pushArgument(m->src,q,
getArg(p, p->retc));
+
m->src->profiler[m->src->stop-1].trace = profiler;
+ }
+ }
+ }
}
GDKfree(old);
}
@@ -181,7 +212,7 @@ mutationSelect(Client cntxt, Mutant m){
InstrPtr p=0, *old= m->src->stmt, q;
int matpc = 0, profiler=0;
- (void) cntxt;
+ (void) cntxt;
limit= m->src->stop;
if ( newMalBlkStmt(m->src, m->src->ssize) < 0)
return;
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
@@ -46,6 +46,11 @@ RUNmulticore(Client cntxt, MalBlkPtr mb,
Mutant mutant;
str msg;
lng clk;
+
+ // Mrunal added this
+// int i;
+// InstrPtr *old, q,t;
+
int *ret = (int*) getArgReference(stk,pci,0);
(void) cntxt;
@@ -85,6 +90,23 @@ RUNmulticore(Client cntxt, MalBlkPtr mb,
// update garbage collection admin
malGarbageCollector(mb);
+ // temporary code
+/* old = mutant->src->stmt;
+ for (i = getPC(mb,pci); i < mutant->src->stop; i++)
+ {
+ q = old[i];
+
+ if ( getModuleId(q) == algebraRef && getFunctionId(q) ==
joinRef)
+ {
+ pushInstruction(mutant->src, q);
+ t= newStmt(mutant->src, ioRef, printRef);
+ t = pushArgument(mutant->src, t, getArg(q, q->retc));
+ // inherit profiling
+ //m->src->profiler[m->src->stop-1].trace = profiler;
+ }
+ }
+*/
+
clk = GDKusec();
msg = runMALdataflow(cntxt, mutant->src, getPC(mb,pci), mutant->stk);
mutant->src->calls++;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list