MonetDB: default - Remove unused function MCforkClient.

2023-03-28 Thread Sjoerd Mullender
Changeset: 7314fdb21a58 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7314fdb21a58
Modified Files:
clients/Tests/exports.stable.out
monetdb5/mal/mal_client.c
monetdb5/mal/mal_client.h
Branch: default
Log Message:

Remove unused function MCforkClient.


diffs (81 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
@@ -753,7 +753,6 @@ MALfcn MANIFOLDtypecheck(Client cntxt, M
 int MCactiveClients(void);
 str MCawakeClient(int id);
 void MCcloseClient(Client c);
-Client MCforkClient(Client father);
 Client MCgetClient(int id);
 Client MCinitClient(oid user, bstream *fin, stream *fout);
 int MCpushClientInput(Client c, bstream *new_input, int listing, const char 
*prompt);
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
@@ -343,55 +343,6 @@ MCinitClientThread(Client c)
return 0;
 }
 
-/*
- * Forking is a relatively cheap way to create a new client.  The new
- * client record shares the IO descriptors.  To avoid interference, we
- * limit children to only produce output by closing the input-side.
- *
- * If the father itself is a temporary client, let the new child depend
- * on the grandfather.
- */
-Client
-MCforkClient(Client father)
-{
-   /* TO BE REMOVED: this function is not used anywhere */
-   Client son = NULL;
-
-   if (father == NULL)
-   return NULL;
-   if (father->father != NULL)
-   father = father->father;
-   if ((son = MCinitClient(father->user, father->fdin, father->fdout))) {
-   son->fdin = NULL;
-   son->fdout = father->fdout;
-   son->bak = NULL;
-   son->yycur = 0;
-   son->father = father;
-   son->login = father->login;
-   son->idle = father->idle;
-   son->scenario = father->scenario;
-   strcpy_len(father->optimizer, son->optimizer, 
sizeof(father->optimizer));
-   son->workerlimit = father->workerlimit;
-   son->memorylimit = father->memorylimit;
-   son->qryctx.querytimeout = father->qryctx.querytimeout;
-   son->qryctx.maxmem = father->qryctx.maxmem;
-   son->maxmem = father->maxmem;
-   son->sessiontimeout = father->sessiontimeout;
-
-   son->prompt = father->prompt;
-   son->promptlength = strlen(son->prompt);
-   /* reuse the scopes wherever possible */
-   if (son->usermodule == 0) {
-   son->usermodule = userModule();
-   if (son->usermodule == 0) {
-   MCcloseClient(son);
-   return NULL;
-   }
-   }
-   }
-   return son;
-}
-
 static bool shutdowninprogress = false;
 
 bool
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
@@ -179,7 +179,6 @@ mal_export ClientRec *mal_clients;
 
 mal_export Client  MCgetClient(int id);
 mal_export Client  MCinitClient(oid user, bstream *fin, stream *fout);
-mal_export Client  MCforkClient(Client father);
 mal_export void   MCstopClients(Client c);
 mal_export intMCactiveClients(void);
 mal_export voidMCcloseClient(Client c);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Remove unused function BBPresetfarms.

2019-03-20 Thread Sjoerd Mullender
Changeset: 6238eeb5616a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6238eeb5616a
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk_bbp.c
gdk/gdk_bbp.h
Branch: default
Log Message:

Remove unused function BBPresetfarms.


diffs (46 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
@@ -194,7 +194,6 @@ BAT *BBPquickdesc(bat b, bool delaccess)
 int BBPreclaim(BAT *b);
 int BBPrelease(bat b);
 int BBPrename(bat bid, const char *nme);
-void BBPresetfarms(void);
 int BBPretain(bat b);
 gdk_return BBPsave(BAT *b);
 void BBPshare(bat b);
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1099,20 +1099,6 @@ BBPaddfarm(const char *dirname, int role
return GDK_FAIL;
 }
 
-void
-BBPresetfarms(void)
-{
-   BBPexit();
-   BBPunlock();
-   ATOMIC_SET(&BBPsize, 0);
-   if (BBPfarms[0].dirname != NULL) {
-   GDKfree((void*) BBPfarms[0].dirname); /* loose "const" */
-   }
-   BBPfarms[0].dirname = NULL;
-   BBPfarms[0].roles = 0;
-}
-
-
 gdk_return
 BBPinit(void)
 {
diff --git a/gdk/gdk_bbp.h b/gdk/gdk_bbp.h
--- a/gdk/gdk_bbp.h
+++ b/gdk/gdk_bbp.h
@@ -57,7 +57,6 @@ gdk_export bat getBBPsize(void); /* curr
 
 /* global calls */
 gdk_export gdk_return BBPaddfarm(const char *dirname, int rolemask);
-gdk_export void BBPresetfarms(void);
 
 /* update interface */
 gdk_export void BBPclear(bat bid);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Remove unused function.

2017-01-13 Thread Sjoerd Mullender
Changeset: 7135648436ef for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7135648436ef
Modified Files:
monetdb5/mal/mal_sabaoth.c
Branch: default
Log Message:

Remove unused function.


diffs (18 lines):

diff --git a/monetdb5/mal/mal_sabaoth.c b/monetdb5/mal/mal_sabaoth.c
--- a/monetdb5/mal/mal_sabaoth.c
+++ b/monetdb5/mal/mal_sabaoth.c
@@ -34,14 +34,6 @@
 #define close _close
 #endif
 
-inline static char *
-fromMallocToGDK(char *val)
-{
-   char *ret = GDKstrdup(val);
-   free(val);
-   return(ret);
-}
-
 #define excFromMem(TPE, WHRE, X)   
\
do {
\
str _me = createException(TPE, WHRE, "%s", X);  \
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Remove unused function.

2016-07-31 Thread Martin Kersten
Changeset: 9b5e9ad27c5b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b5e9ad27c5b
Modified Files:
monetdb5/optimizer/opt_dataflow.c
monetdb5/optimizer/opt_dataflow.h
Branch: default
Log Message:

Remove unused function.
We should not attempt to revert optimizer steps.
It is better to pre-analyse and ignore the step.


diffs (157 lines):

diff --git a/monetdb5/optimizer/opt_dataflow.c 
b/monetdb5/optimizer/opt_dataflow.c
--- a/monetdb5/optimizer/opt_dataflow.c
+++ b/monetdb5/optimizer/opt_dataflow.c
@@ -58,74 +58,6 @@ simpleFlow(InstrPtr *old, int start, int
return simple;
 }
 
-/* optimizers may remove the dataflow and language.pass hints first */
-void removeDataflow(MalBlkPtr mb)
-{
-   int i, k, flowblock=0, limit;
-   InstrPtr p, *old;
-   int *init= GDKzalloc(mb->vtop * sizeof(int)), skip = 0;
-   char *delete= (char*) GDKzalloc(mb->stop);
-   char *used= (char*) GDKzalloc(mb->vtop);
-
-   if ( delete == 0 || init == 0 || used == 0){
-   if( delete) GDKfree(delete);
-   if( used) GDKfree(used);
-   if( init) GDKfree(init);
-   return;
-   }
-   old = mb->stmt;
-   limit = mb->stop;
-   if ( newMalBlkStmt(mb, mb->ssize) <0 ){
-   GDKfree(delete);
-   GDKfree(used);
-   GDKfree(init);
-   return;
-   }
-   /* remove the inlined dataflow barriers */
-   for (i = 1; iretc; k < p->argc; k++)
-   used[getArg(p,k)] = 1;
-   if ( init[getArg(p,0)]  && ! used[getArg(p,0)]) 
-   /* remove the old initialization */
-   delete[ init[getArg(p,0)]] = 1;
-   init[getArg(p,0)] = i;
-   }
-   }
-   /* remove the superflous variable initializations */
-   /* when there are no auxiliary barrier blocks */
-   for (i = 0; iinlineProp)
return 0;
-   OPTDEBUGdataflow{
+#ifdef DEBUG_OPT_DATAFLOW
mnstr_printf(cntxt->fdout,"#dataflow input\n");
printFunction(cntxt->fdout, mb, 0, LIST_MAL_ALL);
-   }
+#endif
 
vlimit = mb->vsize;
eolife= (int*) GDKzalloc(vlimit * sizeof(int));
@@ -238,10 +170,6 @@ OPTdataflowImplementation(Client cntxt, 
for (j = 0; j < p->argc; j++)
eolife[getArg(p,j)]= i;
}
-   //OPTDEBUGdataflow{
-   //for(i= 0;  i < mb->vtop; i++)
-   //mnstr_printf(cntxt->fdout,"#eolife %d -> %d\n",i, 
eolife[i]);
-   //}
 
// make sure we have space for the language.pass operation
// for all variables within the barrier
@@ -257,10 +185,10 @@ OPTdataflowImplementation(Client cntxt, 
conflict = 0;
 
if ( dataflowConflict(cntxt,mb,p) || (conflict = 
dflowAssignConflict(p,i,assigned,eolife)) )  {
-   OPTDEBUGdataflow{
-   mnstr_printf(cntxt->fdout,"#conflict %d 
dataflow %d dflowAssignConflict %d\n",i, 
dataflowConflict(cntxt,mb,p),dflowAssignConflict(p,i,assigned,eolife));
-   printInstruction(cntxt->fdout, mb, 0, p, 
LIST_MAL_ALL);
-   }
+#ifdef DEBUG_OPT_DATAFLOW
+   mnstr_printf(cntxt->fdout,"#conflict %d dataflow %d 
dflowAssignConflict %d\n",i, 
dataflowConflict(cntxt,mb,p),dflowAssignConflict(p,i,assigned,eolife));
+   printInstruction(cntxt->fdout, mb, 0, p, LIST_MAL_ALL);
+#endif
/* close previous flow block */
if ( !(simple = simpleFlow(old,start,i))){
for( j=start ; j 0){
 chkTypes(cntxt->fdout, cntxt->nspace, mb, FALSE);
@@ -373,5 +293,13 @@ wrapup:
 snprintf(buf,256,"%-20s actions=%2d time=" LLFMT " 
usec","dataflow",actions,GDKusec() - usec);
 newComment(mb,buf);
 
+wrapup:
+   if( eolife) GDKfree(eolife);
+   if( init) GDKfree(init);
+   if( used) GDKfree(used);
+   if( sink) GDKfree(sink);
+   if( assigned) GDKfree(assigned);
+   if( old) GDKfree(old);
+
return actions;
 }
diff --git a/monetdb5/optimizer/opt_dataflow.h 
b/monetdb5/optimizer/opt_dataflow.h
--- a/monetdb5/optimizer/opt_dataflow.h
+++ b/monetdb5/optimizer/opt_dataflow.h
@@ -12,7 +12,6 @@
 #include "opt_support.h"
 
 #define OPTDEBUGdataflow  if ( optDebug & ((lng) 1 

MonetDB: default - Remove unused function BBPreleaseref.

2015-01-22 Thread Sjoerd Mullender
Changeset: 4d65ce5e9efe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4d65ce5e9efe
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk_bbp.c
gdk/gdk_bbp.h
Branch: default
Log Message:

Remove unused function BBPreleaseref.


diffs (45 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
@@ -222,7 +222,6 @@ int BBPout;
 str BBPphysical(bat b, str buf);
 BAT *BBPquickdesc(bat b, int delaccess);
 int BBPreclaim(BAT *b);
-void BBPreleaseref(bat i);
 int BBPrename(bat bid, const char *nme);
 int BBPsave(BAT *b);
 void BBPshare(bat b);
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2412,19 +2412,6 @@ BBPkeepref(bat i)
}
 }
 
-void
-BBPreleaseref(bat i)
-{
-   int lock = locked_by ? MT_getpid() != locked_by : 1;
-
-   if (i == bat_nil)
-   return;
-   if (i < 0)
-   i = -i;
-   assert(BBP_refs(i) > 0);
-   decref(i, FALSE, FALSE, lock);
-}
-
 static inline void
 GDKunshare(bat parent)
 {
diff --git a/gdk/gdk_bbp.h b/gdk/gdk_bbp.h
--- a/gdk/gdk_bbp.h
+++ b/gdk/gdk_bbp.h
@@ -87,7 +87,6 @@ gdk_export BAT *BBPdescriptor(bat b);
 gdk_export int BBPsync(int cnt, bat *subcommit);
 gdk_export int BBPincref(bat b, int logical);
 gdk_export void BBPkeepref(bat i);
-gdk_export void BBPreleaseref(bat i);
 gdk_export int BBPdecref(bat b, int logical);
 gdk_export void BBPshare(bat b);
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Remove unused function.

2012-01-13 Thread Martin Kersten
Changeset: c3830ea8b04f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c3830ea8b04f
Modified Files:
monetdb5/optimizer/opt_mergetable.mx
Branch: default
Log Message:

Remove unused function.


diffs (24 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.mx 
b/monetdb5/optimizer/opt_mergetable.mx
--- a/monetdb5/optimizer/opt_mergetable.mx
+++ b/monetdb5/optimizer/opt_mergetable.mx
@@ -1893,20 +1893,6 @@ mat_setop(MalBlkPtr mb, InstrPtr p, mat_
return 0;
 }
 
-#ifndef NDEBUG
-static int
-check_instr(MalBlkPtr mb, InstrPtr p)
-{
-   int i;
-
-   for (i = 0; istop; i++) {
-   if (mb->stmt[i] == p)
-   return 1;
-   }
-   return 0;
-}
-#endif
-
 static int
 OPTmergetableImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p) 
 {
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list