Changeset: 84bb6fed6e78 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=84bb6fed6e78
Modified Files:
monetdb5/mal/mal_client.c
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_runtime.c
Branch: default
Log Message:
Remove obsolete variable, which wasn't thread protected either.
diffs (67 lines):
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
@@ -226,7 +226,6 @@ MCinitClientRecord(Client c, oid user, b
c->father = NULL;
c->login = c->lastcmd = time(0);
- //c->active = 0;
c->session = GDKusec();
c->qtimeout = 0;
c->stimeout = 0;
@@ -405,7 +404,6 @@ MCfreeClient(Client c)
c->usermodule = c->curmodule = 0;
c->father = 0;
c->login = c->lastcmd = 0;
- //c->active = 0;
c->qtimeout = 0;
c->stimeout = 0;
c->user = oid_nil;
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -554,11 +554,10 @@ openProfilerStream(stream *fd, int mode)
if( (mode & PROFSHOWRUNNING) > 0){
for (i = 0; i < MAL_MAXCLIENTS; i++) {
c = mal_clients+i;
- if ( c->active )
- for(j = 0; j <THREADS; j++)
- if( c->inprogress[j].mb)
- /* show the event */
- profilerEvent(c->inprogress[j].mb,
c->inprogress[j].stk, c->inprogress[j].pci, 1, c->username);
+ for(j = 0; j <THREADS; j++)
+ if( c->inprogress[j].mb)
+ /* show the event */
+ profilerEvent(c->inprogress[j].mb,
c->inprogress[j].stk, c->inprogress[j].pci, 1, c->username);
}
}
return MAL_SUCCEED;
diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c
--- a/monetdb5/mal/mal_runtime.c
+++ b/monetdb5/mal/mal_runtime.c
@@ -169,8 +169,7 @@ runtimeProfileBegin(Client cntxt, MalBlk
int tid = THRgettid();
assert(pci);
- /* keep track on the instructions taken in progress */
- cntxt->active = TRUE;
+ /* keep track on the instructions taken in progress for stethoscope*/
if( tid < THREADS){
cntxt->inprogress[tid].mb = mb;
cntxt->inprogress[tid].stk = stk;
@@ -198,7 +197,6 @@ runtimeProfileExit(Client cntxt, MalBlkP
cntxt->inprogress[tid].pci = 0;
}
- assert(prof);
/* always collect the MAL instruction execution time */
pci->ticks = ticks - prof->ticks;
pci->totticks += pci->ticks;
@@ -211,7 +209,6 @@ runtimeProfileExit(Client cntxt, MalBlkP
if( getInstrPtr(mb,0) == pci)
malProfileMode = 1;
}
- cntxt->active = FALSE;
/* Reduce worker threads of non-admin long running transaction if
needed.
* the punishment is equal to the duration of the last instruction */
if ( cntxt->user != MAL_ADMIN && ticks - mb->starttime > LONGRUNNING )
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list