Changeset: 50ff8bc64cad for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=50ff8bc64cad Modified Files: MonetDB5/mal/mal_dataflow.c MonetDB5/mal/mal_interpreter.c MonetDB5/mal/mal_resource.c Branch: gdk-tracer Log Message:
Replaced fprintf(stderr, ...) after merge diffs (104 lines): diff --git a/MonetDB5/mal/mal_dataflow.c b/MonetDB5/mal/mal_dataflow.c --- a/MonetDB5/mal/mal_dataflow.c +++ b/MonetDB5/mal/mal_dataflow.c @@ -395,8 +395,8 @@ DFLOWworker(void *T) } } error = runMALsequence(flow->cntxt, flow->mb, fe->pc, fe->pc + 1, flow->stk, 0, 0); - PARDEBUG fprintf(stderr, "#executed pc= %d wrk= %d claim= " LLFMT "," LLFMT "," LLFMT " %s\n", - fe->pc, id, fe->argclaim, fe->hotclaim, fe->maxclaim, error ? error : ""); + DEBUG(PAR, "Executed pc=%d wrk=%d claim=" LLFMT "," LLFMT "," LLFMT " %s\n", + fe->pc, id, fe->argclaim, fe->hotclaim, fe->maxclaim, error ? error : ""); /* release the memory claim */ MALadmission(flow->cntxt, flow->mb, flow->stk, p, -fe->argclaim); /* update the numa information. keep the thread-id producing the value */ 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 @@ -569,7 +569,7 @@ str runMALsequence(Client cntxt, MalBlkP * time and print the query */ if (ATOMIC_CAS(&cntxt->lastprint, &lp, t)) { const char *q = cntxt->getquery ? cntxt->getquery(cntxt) : NULL; - fprintf(stderr, "#%s: query already running "LLFMT"s: %.200s\n", + INFO(MAL_ALL, "%s: query already running "LLFMT"s: %.200s\n", cntxt->mythread->name, (lng) (time(0) - cntxt->lastcmd), q ? q : ""); diff --git a/MonetDB5/mal/mal_resource.c b/MonetDB5/mal/mal_resource.c --- a/MonetDB5/mal/mal_resource.c +++ b/MonetDB5/mal/mal_resource.c @@ -131,21 +131,18 @@ MALadmission(Client cntxt, MalBlkPtr mb, */ workers = stk->workers; if( cntxt->workerlimit && cntxt->workerlimit <= workers){ - PARDEBUG - fprintf(stderr, "#DFLOWadmit worker limit reached, %d <= %d\n", cntxt->workerlimit, workers); + DEBUG(PAR, "Worker limit reached, %d <= %d\n", cntxt->workerlimit, workers); MT_lock_unset(&admissionLock); return -1; } /* Determine if the total memory resource is exhausted, because it is overall limitation. */ if ( memoryclaims < 0){ - PARDEBUG - fprintf(stderr, "#DFLOWadmit memoryclaim reset "); + DEBUG(PAR, "Memoryclaim reset\n"); memoryclaims = 0; } if ( memorypool <= 0 && memoryclaims == 0){ - PARDEBUG - fprintf(stderr, "#DFLOWadmit memorypool reset "); + DEBUG(PAR, "Memorypool reset\n"); memorypool = (lng) MEMORY_THRESHOLD; } @@ -158,8 +155,7 @@ MALadmission(Client cntxt, MalBlkPtr mb, mbytes = (lng) cntxt->memorylimit * LL_CONSTANT(1048576); if (argclaim + stk->memory > mbytes){ MT_lock_unset(&admissionLock); - PARDEBUG - fprintf(stderr, "#Delayed due to lack of session memory " LLFMT " requested "LLFMT"\n", + DEBUG(PAR, "Delayed due to lack of session memory " LLFMT " requested "LLFMT"\n", stk->memory, argclaim); return -1; } @@ -167,24 +163,21 @@ MALadmission(Client cntxt, MalBlkPtr mb, memorypool -= argclaim; stk->memory += argclaim; memoryclaims++; - PARDEBUG - fprintf(stderr, "#DFLOWadmit %3d thread %d pool " LLFMT "claims " LLFMT "\n", - memoryclaims, THRgettid(), memorypool, argclaim); + DEBUG(PAR, "%3d thread %d pool " LLFMT "claims " LLFMT "\n", + memoryclaims, THRgettid(), memorypool, argclaim); stk->workers++; MT_lock_unset(&admissionLock); return 0; } - PARDEBUG - fprintf(stderr, "#Delayed due to lack of memory " LLFMT " requested " LLFMT " memoryclaims %d\n", - memorypool, argclaim, memoryclaims); + DEBUG(PAR, "Delayed due to lack of memory " LLFMT " requested " LLFMT " memoryclaims %d\n", + memorypool, argclaim, memoryclaims); MT_lock_unset(&admissionLock); return -1; } /* return the session budget */ if (cntxt->memorylimit) { - PARDEBUG - fprintf(stderr, "#Return memory to session budget " LLFMT "\n", stk->memory); + DEBUG(PAR, "Return memory to session budget " LLFMT "\n", stk->memory); stk->memory -= argclaim; } /* release memory claimed before */ @@ -192,8 +185,7 @@ MALadmission(Client cntxt, MalBlkPtr mb, memoryclaims--; stk->workers--; - PARDEBUG - fprintf(stderr, "#DFLOWadmit %3d thread %d pool " LLFMT " claims " LLFMT "\n", + DEBUG(PAR, "%3d thread %d pool " LLFMT " claims " LLFMT "\n", memoryclaims, THRgettid(), memorypool, argclaim); MT_lock_unset(&admissionLock); return 0; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list