Changeset: 1bbe44d7a9ee for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1bbe44d7a9ee Modified Files: monetdb5/mal/mal_debugger.c monetdb5/mal/mal_interpreter.c sql/backends/monet5/sql_scenario.c Branch: default Log Message:
Merge with Sep2022 branch. diffs (122 lines): 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 @@ -202,7 +202,7 @@ mdbBacktrace(Client cntxt, MalStkPtr stk for (; stk != NULL; stk = stk->up) { printCall(cntxt, stk->blk, stk, pci); if (stk->up) - pci = stk->up->pcup; + pci = stk->pcup; } } 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 @@ -751,12 +751,12 @@ runMALsequence(Client cntxt, MalBlkPtr m InstrPtr q; int ii, arg; - stk->pcup = stkpc; nstk = prepareMALstack(pci->blk, pci->blk->vsize); if (nstk == 0){ ret= createException(MAL,"mal.interpreter",MAL_STACK_FAIL); break; } + nstk->pcup = stkpc; /*safeguardStack*/ nstk->stkdepth = nstk->stksize + stk->stkdepth; @@ -951,7 +951,7 @@ runMALsequence(Client cntxt, MalBlkPtr m exceptionVar = findVariableLength(mb, ret, (int)(msg - ret)); } if (exceptionVar == -1) - exceptionVar = findVariable(mb, "ANYexception"); + exceptionVar = findVariableLength(mb, "ANYexception", 12); /* unknown exceptions lead to propagation */ if (exceptionVar == -1) { @@ -1421,8 +1421,6 @@ garbageElement(Client cntxt, ValPtr v) v->val.bval = bat_nil; if (is_bat_nil(bid)) return; - if (!BBP_lrefs(bid)) - return; BBPcold(bid); BBPrelease(bid); } else if (0 < v->vtype && v->vtype < MAXATOMS && ATOMextern(v->vtype)) { diff --git a/monetdb5/mal/mal_profiler.h b/monetdb5/mal/mal_profiler.h --- a/monetdb5/mal/mal_profiler.h +++ b/monetdb5/mal/mal_profiler.h @@ -61,6 +61,7 @@ mal_export str closeProfilerStream(Clien mal_export void profilerEvent(MalEvent *me, NonMalEvent *nme); mal_export void sqlProfilerEvent(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); +mal_export oid runtimeProfileSetTag(Client cntxt); mal_export str startProfiler(Client cntxt); mal_export str stopProfiler(Client cntxt); diff --git a/monetdb5/mal/mal_runtime.h b/monetdb5/mal/mal_runtime.h --- a/monetdb5/mal/mal_runtime.h +++ b/monetdb5/mal/mal_runtime.h @@ -62,7 +62,6 @@ typedef struct WORKINGSET{ mal_export Workingset workingset[THREADS]; -mal_export oid runtimeProfileSetTag(Client cntxt); mal_export void runtimeProfileInit(Client cntxt, MalBlkPtr mb, MalStkPtr stk); mal_export void runtimeProfileFinish(Client cntxt, MalBlkPtr mb, MalStkPtr stk); mal_export void runtimeProfileBegin(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, RuntimeProfile prof); 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 @@ -474,6 +474,7 @@ MDBStkTrace(Client cntxt, MalBlkPtr m, M bat *ret2 = getArgReference_bat(s, p, 1); int k = 0; size_t len,l; + int pcup; b = COLnew(0, TYPE_int, 256, TRANSIENT); if ( b== NULL) @@ -510,8 +511,8 @@ MDBStkTrace(Client cntxt, MalBlkPtr m, M } GDKfree(msg); - for (s = s->up, k++; s != NULL; s = s->up, k++) { - if ((msg = instruction2str(s->blk, s, getInstrPtr(s->blk, s->pcup), LIST_MAL_DEBUG)) == NULL){ + for (pcup = s->pcup, s = s->up, k++; s != NULL; pcup = s->pcup, s = s->up, k++) { + if ((msg = instruction2str(s->blk, s, getInstrPtr(s->blk, pcup), LIST_MAL_DEBUG)) == NULL){ BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); throw(MAL,"mdb.setTrace", SQLSTATE(HY013) MAL_MALLOC_FAIL); @@ -530,7 +531,7 @@ MDBStkTrace(Client cntxt, MalBlkPtr m, M } snprintf(buf,len+1024,"%s at %s.%s[%d]", msg, getModuleId(getInstrPtr(s->blk,0)), - getFunctionId(getInstrPtr(s->blk,0)), s->pcup); + getFunctionId(getInstrPtr(s->blk,0)), pcup); if (BUNappend(b, &k, false) != GDK_SUCCEED || BUNappend(bn, buf, false) != GDK_SUCCEED) { GDKfree(buf); diff --git a/sql/backends/monet5/sql_optimizer.c b/sql/backends/monet5/sql_optimizer.c --- a/sql/backends/monet5/sql_optimizer.c +++ b/sql/backends/monet5/sql_optimizer.c @@ -14,7 +14,6 @@ #include "monetdb_config.h" #include "mal_builder.h" #include "mal_debugger.h" -#include "mal_runtime.h" #include "opt_prelude.h" #include "sql_mvc.h" #include "sql_optimizer.h" diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -32,7 +32,6 @@ #include "mal.h" #include "mal_instruction.h" #include "mal_interpreter.h" -#include "mal_runtime.h" #include "mal_parser.h" #include "mal_builder.h" #include "mal_namespace.h" _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org