Changeset: 06de832a111d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06de832a111d
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/exports.stable.out
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_listing.h
Branch: compactprofiler
Log Message:
Remove old code
diffs (192 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -11574,6 +11574,7 @@ stdout of test 'MAL-signatures` in direc
[ "profiler", "getlimit", "command profiler.getlimit():int ",
"CMDgetprofilerlimit;", "Set profiler limit" ]
[ "profiler", "noop", "command profiler.noop():void ",
"CMDnoopProfiler;", "Fetch any pending performance events" ]
[ "profiler", "openstream", "pattern profiler.openstream():void ",
"CMDopenProfilerStream;", "Start profiling the events, send to output
stream" ]
+[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ",
"CMDopenProfilerStream;", "Start profiling the events, send to output
stream" ]
[ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ",
"CMDsetHeartbeat;", "Set heart beat performance tracing" ]
[ "profiler", "setlimit", "command profiler.setlimit(l:int):void ",
"CMDsetprofilerlimit;", "Get profiler limit" ]
[ "profiler", "start", "pattern profiler.start():void ",
"CMDstartProfiler;", "Start offline performance profiling" ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -15978,6 +15978,7 @@ stdout of test 'MAL-signatures` in direc
[ "profiler", "getlimit", "command profiler.getlimit():int ",
"CMDgetprofilerlimit;", "Set profiler limit" ]
[ "profiler", "noop", "command profiler.noop():void ",
"CMDnoopProfiler;", "Fetch any pending performance events" ]
[ "profiler", "openstream", "pattern profiler.openstream():void ",
"CMDopenProfilerStream;", "Start profiling the events, send to output
stream" ]
+[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ",
"CMDopenProfilerStream;", "Start profiling the events, send to output
stream" ]
[ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ",
"CMDsetHeartbeat;", "Set heart beat performance tracing" ]
[ "profiler", "setlimit", "command profiler.setlimit(l:int):void ",
"CMDsetprofilerlimit;", "Get profiler limit" ]
[ "profiler", "start", "pattern profiler.start():void ",
"CMDstartProfiler;", "Start offline performance profiling" ]
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
@@ -2581,7 +2581,6 @@ str setVariableRef;
void setVariableScope(MalBlkPtr mb);
str setWriteModeRef;
void setprofilerlimit(int limit);
-str shortStmtRendering(MalBlkPtr mb, MalStkPtr stl, InstrPtr p);
void showAllScenarios(stream *f);
void showCurrentScenario(void);
void showMalBlkHistory(stream *out, MalBlkPtr mb);
diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -434,144 +434,6 @@ instruction2str(MalBlkPtr mb, MalStkPtr
* If the status is set, then we consider the instruction DONE and the result
variables
* should be shown as well.
*/
-static str
-shortRenderingTerm(MalBlkPtr mb, MalStkPtr stk, InstrPtr p, int idx)
-{
- str s, nme;
- BAT *b;
- ValRecord *val;
- char *cv =0;
- int varid = getArg(p,idx);
- size_t len = BUFSIZ;
-
- s= GDKmalloc(len);
- if( s == NULL)
- return NULL;
- *s = 0;
-
- if( isVarConstant(mb,varid) ){
- val =&getVarConstant(mb, varid);
- if ((cv = VALformat(val)) == NULL) {
- GDKfree(s);
- return NULL;
- }
- if (strlen(cv) >= len) {
- char *nbuf;
- len = strlen(cv);
- nbuf = GDKrealloc(s, len + 1);
- if (nbuf == NULL) {
- GDKfree(s);
- GDKfree(cv);
- return NULL;
- }
- s = nbuf;
- }
- snprintf(s,len + 1,"%s",cv);
- } else {
- val = &stk->stk[varid];
- if ((cv = VALformat(val)) == NULL) {
- GDKfree(s);
- return NULL;
- }
- nme = getVarName(mb, varid);
- if ( isaBatType(getArgType(mb,p,idx))){
- b = BBPquickdesc(stk->stk[varid].val.bval, true);
- snprintf(s,BUFSIZ,"%s["BUNFMT"]" ,nme, b?BATcount(b):0);
- } else
- snprintf(s,BUFSIZ,"%s=%s ",nme,cv);
- }
- GDKfree(cv);
- return s;
-}
-
-str
-shortStmtRendering(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
-{
- int i;
- str base, s, t, nme;
- size_t len= (mb->stop < 1000? 1000: mb->stop) * 128 /* max realistic
line length estimate */;
-
- base = s = GDKmalloc(len);
- if ( s == NULL)
- return s;
- *s =0;
- t=s;
- if (p->token == REMsymbol && !( getModuleId(p) &&
strcmp(getModuleId(p),"querylog") == 0 && getFunctionId(p) &&
strcmp(getFunctionId(p),"define") == 0))
- return base;
- if (p->barrier == LEAVEsymbol ||
- p->barrier == REDOsymbol ||
- p->barrier == RETURNsymbol ||
- p->barrier == YIELDsymbol ||
- p->barrier == EXITsymbol ||
- p->barrier == RAISEsymbol) {
- snprintf(t,(len-(t-base)), "%s ",
operatorName(p->barrier));
- advance(t,base,len);
- }
- if( p->token == FUNCTIONsymbol) {
- snprintf(t,(len-(t-base)), "function %s.",
getModuleId(p));
- advance(t,base,len);
- }
- if (p->token == ENDsymbol ){
- snprintf(t,(len-(t-base)), "end %s.%s",
getModuleId(getInstrPtr(mb,0)), getFunctionId(getInstrPtr(mb,0)));
- return base;
- }
- // handle the result variables
- for (i = 0; i < p->retc; i++)
- if ( !isTmpVar(mb,getArg(p,i)) || isVarUsed(mb, getArg(p, i))
|| isVarUDFtype(mb,getArg(p,i)))
- break;
-
- if (i == p->retc) // no result arguments
- goto short_end;
-
- /* display optional multi-assignment list */
- if( getArgType(mb,p,0) != TYPE_void){
- if (p->retc > 1 && t < base + len-1){
- *t++ = '(';
- *t=0;
- }
-
- for (i = 0; i < p->retc; i++) {
- nme = shortRenderingTerm(mb, stk, p,i);
- snprintf(t,(len-(t-base)), "%s%s", (i?", ":""), nme);
- GDKfree(nme);
- advance(t,base,len);
- }
- if (p->retc > 1 && t< base+len)
- *t++ = ')';
- if( t < base +len) *t++ = ':';
- if( t < base +len) *t++ = '=';
- if( t < base +len) *t++ = ' ';
- }
- *t =0;
-
- short_end:
- advance(t,base,len);
-
- // handle the instruction mapping
- snprintf(t, (len-(t-base)),"%s",
(getFunctionId(p)?getFunctionId(p):""));
- advance(t,base,len);
-
- // handle the arguments, constants should be shown including their
non-default type
- /* display optional multi-assignment list */
- if( t< base + len) *t++ = '(';
- for (i = p->retc; i < p->argc; i++) {
- nme = shortRenderingTerm(mb, stk, p,i);
- snprintf(t,(len-(t-base)), "%s%s", (i!= p->retc? ", ":" "),
nme);
- GDKfree(nme);
- advance(t,base,len);
- if (i < p->retc - 1 && t < base+len){
- *t++ = ',';
- *t++ = ' ';
- }
- }
- if( t < base + len) *t++ = ' ';
- if( t < base + len) *t++ = ')';
- *t=0;
-
- if (t >= s + len)
- throw(MAL,"instruction2str:","instruction too long");
- return base;
-}
/* Remote execution of MAL calls for more type/property information to be
exchanged */
str
diff --git a/monetdb5/mal/mal_listing.h b/monetdb5/mal/mal_listing.h
--- a/monetdb5/mal/mal_listing.h
+++ b/monetdb5/mal/mal_listing.h
@@ -17,7 +17,6 @@ mal_export str fcnDefinition(MalBlkPtr m
mal_export void printInstruction(stream *fd, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p, int flg);
mal_export void fprintInstruction(FILE *fd, MalBlkPtr mb, MalStkPtr stk,
InstrPtr p, int flg);
mal_export str instruction2str(MalBlkPtr mb, MalStkPtr stl, InstrPtr p, int
hidden);
-mal_export str shortStmtRendering(MalBlkPtr mb, MalStkPtr stl, InstrPtr p);
mal_export str mal2str(MalBlkPtr mb, int first, int last);
mal_export void showMalBlkHistory(stream *out, MalBlkPtr mb);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list