Changeset: 893399ff53f2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=893399ff53f2
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/mal/mal_client.c
        monetdb5/mal/mal_client.h
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_debugger.h
        monetdb5/modules/mal/mdb.c
        monetdb5/optimizer/optimizer.c
        monetdb5/optimizer/optimizer.h
        monetdb5/optimizer/optimizer.mal
        monetdb5/scheduler/run_pipeline.c
        monetdb5/scheduler/run_pipeline.h
Branch: default
Log Message:

Remove obsolete stuff


diffs (255 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1605,8 +1605,6 @@ str QLOGenable(void *ret);
 str QLOGenableThreshold(void *ret, int *threshold);
 int QLOGisset(void);
 str QLOGissetFcn(int *ret);
-str QOTclrdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
-str QOTdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 str QOTgetStatistics(bat *ret, str *nme);
 str QOToptimize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 str QOTshowFlowGraph(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
@@ -2004,8 +2002,6 @@ int daytime_tz_fromstr(const char *buf, 
 str dblRef;
 str deblockdataflow(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 void debugFunction(stream *fd, MalBlkPtr mb, MalStkPtr stk, int flg, int 
first, int size);
-str debugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str debugScheduler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 int defConstant(MalBlkPtr mb, int type, ValPtr cst);
 str defineRef;
 void delArgument(InstrPtr p, int varid);
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -239,7 +239,6 @@ MCinitClientRecord(Client c, oid user, b
        c->stimeout = 0;
        c->stage = 0;
        c->itrace = 0;
-       c->debugOptimizer = c->debugScheduler = 0;
        c->flags = 0;
        c->errbuf = 0;
 
diff --git a/monetdb5/mal/mal_client.h b/monetdb5/mal/mal_client.h
--- a/monetdb5/mal/mal_client.h
+++ b/monetdb5/mal/mal_client.h
@@ -73,7 +73,6 @@ typedef struct CLIENT {
        sht     stage;     /* keep track of the phase being ran */
        char    itrace;    /* trace execution using interactive mdb */
                                                /* if set to 'S' it will put 
the process to sleep */
-       short   debugOptimizer,debugScheduler;
        /*
         * For program debugging we need information on the timer and memory
         * usage patterns.
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
@@ -1134,12 +1134,10 @@ runMALDebugger(Client cntxt, MalBlkPtr m
 {
        str oldprompt= cntxt->prompt;
        int oldtrace = cntxt->itrace;
-       int oldopt = cntxt->debugOptimizer;
        int oldhist = cntxt->curprg->def->keephistory;
        str msg;
 
        cntxt->itrace = 'n';
-       cntxt->debugOptimizer = TRUE;
        cntxt->curprg->def->keephistory = TRUE;
 
        msg = runMAL(cntxt, mb, 0, 0);
@@ -1147,7 +1145,6 @@ runMALDebugger(Client cntxt, MalBlkPtr m
        cntxt->curprg->def->keephistory = oldhist;
        cntxt->prompt =oldprompt;
        cntxt->itrace = oldtrace;
-       cntxt->debugOptimizer = oldopt;
        mnstr_printf(cntxt->fdout, "mdb>#EOD\n");
        return msg;
 }
@@ -1400,14 +1397,3 @@ mdbHelp(stream *f)
  * make it thread safe by assigning it to a client record.
  */
 int isInvariant(MalBlkPtr mb, int pcf, int pcl, int varid);
-
-str
-debugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
-       (void) stk;
-
-       cntxt->debugOptimizer = cntxt->debugOptimizer ? FALSE : TRUE;
-       if (pci)
-               removeInstruction(mb, pci);
-       return MAL_SUCCEED;
-}
diff --git a/monetdb5/mal/mal_debugger.h b/monetdb5/mal/mal_debugger.h
--- a/monetdb5/mal/mal_debugger.h
+++ b/monetdb5/mal/mal_debugger.h
@@ -30,5 +30,4 @@ mal_export void printStack(stream *f, Ma
 
 mal_export str runMALDebugger(Client cntxt, MalBlkPtr mb);
 
-mal_export str debugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 #endif /* _MAL_DEBUGGER_h */
diff --git a/monetdb5/modules/mal/mdb.c b/monetdb5/modules/mal/mdb.c
--- a/monetdb5/modules/mal/mdb.c
+++ b/monetdb5/modules/mal/mdb.c
@@ -108,7 +108,6 @@ MDBstart(Client cntxt, MalBlkPtr mb, Mal
        if ( stk->cmd == 0)
                stk->cmd = 'n';
        cntxt->itrace = stk->cmd;
-       cntxt->debugOptimizer= TRUE;
        (void) mb;
        (void) p;
        return MAL_SUCCEED;
@@ -129,7 +128,6 @@ MDBstop(Client cntxt, MalBlkPtr mb, MalS
 {
        stk->cmd = 0;
        cntxt->itrace = 0;
-       cntxt->debugOptimizer= FALSE;
        mnstr_printf(cntxt->fdout,"mdb>#EOD\n");
        (void) mb;
        (void) p;
diff --git a/monetdb5/optimizer/optimizer.c b/monetdb5/optimizer/optimizer.c
--- a/monetdb5/optimizer/optimizer.c
+++ b/monetdb5/optimizer/optimizer.c
@@ -42,27 +42,6 @@ optimizer_prelude(Client cntxt, MalBlkPt
 }
 
 
-int debugOpt = 0;
-str
-QOTdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
-       (void) cntxt;
-       debugOptimizers(cntxt, mb, stk, pci);
-       debugOpt = 1;
-       return MAL_SUCCEED;
-}
-
-str
-QOTclrdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
-       (void) cntxt;
-       (void) mb;
-       (void) stk;
-       (void) pci;
-       debugOpt = 0;
-       return MAL_SUCCEED;
-}
-
 /*
  * MAL functions can be optimized explicitly using the routines below.
  * Beware, the function names should be known as literal strings, because
diff --git a/monetdb5/optimizer/optimizer.h b/monetdb5/optimizer/optimizer.h
--- a/monetdb5/optimizer/optimizer.h
+++ b/monetdb5/optimizer/optimizer.h
@@ -17,8 +17,6 @@
 #include "opt_prelude.h"
 
 mal_export str optimizer_prelude(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
-mal_export str QOTdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
-mal_export str QOTclrdebugOptimizers(Client cntxt, MalBlkPtr mb, MalStkPtr 
stk, InstrPtr pci);
 mal_export str QOToptimize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 mal_export str QOTshowFlowGraph(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
 mal_export str QOTshowPlan(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
p);
diff --git a/monetdb5/optimizer/optimizer.mal b/monetdb5/optimizer/optimizer.mal
--- a/monetdb5/optimizer/optimizer.mal
+++ b/monetdb5/optimizer/optimizer.mal
@@ -145,11 +145,6 @@ pattern optimize(mod:str, fcn:str)
 address QOToptimize
 comment "Optimize a specific operation";
 
-pattern setDebug():void 
-address QOTdebugOptimizers;
-pattern clrDebug():void 
-address QOTclrdebugOptimizers;
-
 pattern showFlowGraph(M:str,F:str,s:str):void 
 address QOTshowFlowGraph
 comment "Dump the data flow of the function 
diff --git a/monetdb5/scheduler/run_pipeline.c 
b/monetdb5/scheduler/run_pipeline.c
--- a/monetdb5/scheduler/run_pipeline.c
+++ b/monetdb5/scheduler/run_pipeline.c
@@ -129,73 +129,12 @@
 #include "opt_prelude.h"
 #include "opt_macro.h"
 
-str
-debugScheduler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
-       (void) stk;
-
-       cntxt->debugScheduler = cntxt->debugScheduler ? FALSE : TRUE;
-       if(pci) {
-               removeInstruction(mb,pci);
-               chkFlow(cntxt->fdout, mb);
-       }
-       return MAL_SUCCEED;
-}
-
 /*
  * The implementation approach of the scheduler aligns with that of the
  * optimizer. We look for specific scheduler module calls and act accordingly.
  * The result should be a MAL block that can be executed by the corresponding
  * engine.
  */
-static str
-schedulerMALBlock(Client cntxt, MalBlkPtr mb)
-{
-       InstrPtr p;
-       int callMALinterpreter = 1, pc, cnt = 0;
-       str msg = MAL_SUCCEED;
-       int loops = 0;
-
-#ifdef DEBUG_MAL_SCHEDULER
-       int oldstop = mb->stop;
-#endif
-       /* update the runtime status */
-
-       do {
-               cnt = 0;
-               for (pc = 0; pc < mb->stop; pc++) {
-                       p = getInstrPtr(mb, pc);
-                       if (getModuleId(p) && idcmp(getModuleId(p), 
"scheduler") == 0) {
-                               cnt++;
-                               callMALinterpreter++;
-                               if (p->fcn)
-                                       /* all schedulers should behave like 
patterns */
-                                       /* However, we don't have a stack now */
-                                       msg = (str) (*p->fcn) (mb, 0, p);
-                               if (msg)
-                                       return msg;
-                               pc--;   /*scheduler statement has been removed 
*/
-                       }
-               }
-       } while (cnt && loops++ < 64);
-       if (callMALinterpreter)
-               return MAL_SUCCEED;
-#ifdef DEBUG_MAL_SCHEDULER
-       if (cntxt->debugScheduler && oldstop != mb->stop) {
-               mnstr_printf(cntxt->fdout, "Scheduler effect %d -> %d 
instructions\n", oldstop, mb->stop);
-       }
-#endif
-       if (cnt >= 64)
-               throw(MAL, "scheduler.MALpipeline", OPERATION_FAILED "too many 
optimization cycles\n");
-       return MAL_SUCCEED;
-}
-
-str
-MALpipeline(Client c)
-{
-       return schedulerMALBlock(c, c->curprg->def);
-}
-
 /*
  * The second example is derived from the SQL environment, which
  * produces two MAL functions: one (already) stored in the query cache
diff --git a/monetdb5/scheduler/run_pipeline.h 
b/monetdb5/scheduler/run_pipeline.h
--- a/monetdb5/scheduler/run_pipeline.h
+++ b/monetdb5/scheduler/run_pipeline.h
@@ -29,6 +29,5 @@ struct {
 } runtime;
 
 mal_export str MALpipeline(Client c);
-mal_export str debugScheduler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 
 #endif /* MAL_SCEDULER */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to