Changeset: 75839a624507 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=75839a624507 Modified Files: MonetDB5/src/mal/mal_debugger.mx MonetDB5/src/mal/mal_interpreter.mx Branch: default Log Message:
Trace the BAT properties If you issue the 'set bbp' command in the interpreter, it will check after each instruction for any change in the BAT properties. This might help localization of inc/decref issues. diffs (56 lines): diff -r d2a86ea36d1e -r 75839a624507 MonetDB5/src/mal/mal_debugger.mx --- a/MonetDB5/src/mal/mal_debugger.mx Sat Sep 18 22:18:30 2010 +0200 +++ b/MonetDB5/src/mal/mal_debugger.mx Sat Sep 18 23:11:21 2010 +0200 @@ -778,8 +778,6 @@ int i, action; (void) mb; - if ( BBPtraceEnabled == 0) - return 0; if (BBPmirror == NULL ){ bbpsize= BBPsize; BBPmirror = (int*) GDKzalloc(sizeof(int) * BBPsize); @@ -801,8 +799,9 @@ if ( BBPtracePattern && strstr(lbuf,BBPtracePattern) != NULL ) continue; BBPphysical(i,pbuf); - mnstr_printf(cntxt->fdout, "#BBP [%d] state change of %s %s refs %d rows " BUNFMT"\n", - i,lbuf,pbuf, BBP_lrefs(i), BATcount(b)); + if ( BBPmirror[i] ) + mnstr_printf(cntxt->fdout, "#BBP [%d] state change of %s %s refs %d rows " BUNFMT"\n", + i,lbuf,pbuf, BBP_lrefs(i), BATcount(b)); action = 1; } BBPmirror[i] = BBP_lrefs(i); diff -r d2a86ea36d1e -r 75839a624507 MonetDB5/src/mal/mal_interpreter.mx --- a/MonetDB5/src/mal/mal_interpreter.mx Sat Sep 18 22:18:30 2010 +0200 +++ b/MonetDB5/src/mal/mal_interpreter.mx Sat Sep 18 23:11:21 2010 +0200 @@ -966,7 +966,7 @@ lng oldtimer=0; struct Mallinfo oldMemory = MT_mallinfo(); MT_Lock *lock = &flow->done->l; - int tid = t->id; + int tid = t->id, prevpc= 0; lng argclaim,retclaim,hotclaim; #ifdef HAVE_SYS_RESOURCE_H @@ -989,6 +989,9 @@ lng tm = 0; if( oldtimer) tm = GDKusec(); + if( cntxt->flags & bbpFlag) + BBPTraceCall(cntxt,mb,stk,prevpc); + prevpc = stkpc; mdbStep(cntxt,mb,stk, getPC(mb,pci)); if (stk->cmd == 'x' || cntxt->mode == FINISHING) { /* need a way to skip */ @@ -2169,6 +2172,9 @@ @= skipToCatch if( stk->cmd == 'C' || mb->trap) { stk->cmd = 'n'; + if( cntxt->flags & bbpFlag) + BBPTraceCall(cntxt,mb,stk,prevpc); + prevpc = stkpc; mdbStep(cntxt,mb,stk,stkpc); if( stk->cmd == 'x' || cntxt->mode == FINISHING) { stkpc = mb->stop; _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list