Changeset: 448afdb73926 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=448afdb73926
Modified Files:
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/profiler.h
monetdb5/modules/mal/profiler.mal
monetdb5/optimizer/opt_querylog.c
Branch: default
Log Message:
Restore the getFootprint operation.
diffs (60 lines):
diff --git a/monetdb5/modules/mal/profiler.c b/monetdb5/modules/mal/profiler.c
--- a/monetdb5/modules/mal/profiler.c
+++ b/monetdb5/modules/mal/profiler.c
@@ -385,3 +385,15 @@ CMDcpuloadPercentage(int *cycles, int *i
}
return MAL_SUCCEED;
}
+
+str
+CMDgetFootprint( Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci){
+ lng *l= getArgReference(stk,pci,0);
+
+ (void) cntxt;
+ (void) mb;
+ (void) pci;
+ *l = stk->tmpspace;
+ stk->tmpspace = 0;
+ return MAL_SUCCEED;
+}
diff --git a/monetdb5/modules/mal/profiler.h b/monetdb5/modules/mal/profiler.h
--- a/monetdb5/modules/mal/profiler.h
+++ b/monetdb5/modules/mal/profiler.h
@@ -77,7 +77,6 @@ profiler_export str CMDgetDiskReads(lng
profiler_export str CMDgetDiskWrites(lng *ret);
profiler_export str CMDgetUserTime(lng *ret);
profiler_export str CMDgetSystemTime(lng *ret);
-profiler_export str CMDsetFootprintFlag( Client cntxt, MalBlkPtr mb, MalStkPtr
stk, InstrPtr pci);
profiler_export str CMDgetFootprint( Client cntxt, MalBlkPtr mb, MalStkPtr
stk, InstrPtr pci);
profiler_export str CMDtomograph(int *ret);
profiler_export str CMDcpustats(lng *user, lng *nice, lng *sys, lng *idle, lng
*iowait);
diff --git a/monetdb5/modules/mal/profiler.mal
b/monetdb5/modules/mal/profiler.mal
--- a/monetdb5/modules/mal/profiler.mal
+++ b/monetdb5/modules/mal/profiler.mal
@@ -130,3 +130,7 @@ comment "Extract cpu statistics from the
command cpuload(user:lng, nice:lng,
sys:lng,idle:lng,iowait:lng)(cycles:int,io:int)
address CMDcpuloadPercentage
comment "Calculate the average cpu load percentage and io waiting times";
+
+pattern getFootprint():lng
+address CMDgetFootprint
+comment "Get the amount of memory claimed and reset the flag";
diff --git a/monetdb5/optimizer/opt_querylog.c
b/monetdb5/optimizer/opt_querylog.c
--- a/monetdb5/optimizer/opt_querylog.c
+++ b/monetdb5/optimizer/opt_querylog.c
@@ -75,7 +75,6 @@ OPTquerylogImplementation(Client cntxt,
arg= getArg(q,0)= newVariable(mb,GDKstrdup("args"),TYPE_str);
- newFcnCall(mb,"profiler","setFootprintFlag");
q = newStmt(mb, "alarm", "usec");
xtime = getArg(q,0)= newVariable(mb,GDKstrdup("xtime"),TYPE_lng);
user = newVariable(mb,GDKstrdup("user"),TYPE_lng);
@@ -181,7 +180,6 @@ OPTquerylogImplementation(Client cntxt,
q = newAssignment(mb);
q = pushWrd(mb,q,0);
tuples= getArg(q,0)=
newVariable(mb,GDKstrdup("tuples"),TYPE_wrd);
- newFcnCall(mb,"profiler","setFootprintFlag");
newFcnCall(mb,"profiler","setMemoryFlag");
q->argc--;
pushWrd(mb,q,1);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list