Changeset: 9d0067c56ebe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9d0067c56ebe
Modified Files:
        monetdb5/mal/mal_profiler.c
Branch: default
Log Message:

Auto reset the trace tables when you ask for it.


diffs (42 lines):

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
@@ -493,6 +493,8 @@ startProfiler(void)
        sqlProfiling = TRUE;
        MT_lock_unset(&mal_profileLock);
        logjsonInternal(monet_characteristics);
+       // reset the trace table
+       clearTrace();
 
        return MAL_SUCCEED;
 }
@@ -697,15 +699,6 @@ initTrace(void)
        return ret;
 }
 
-str
-cleanupTraces(void)
-{
-       MT_lock_set(&mal_contextLock);
-       _cleanupProfiler();
-       MT_lock_unset(&mal_contextLock);
-       return MAL_SUCCEED;
-}
-
 void
 clearTrace(void)
 {
@@ -731,6 +724,13 @@ clearTrace(void)
        initTrace();
 }
 
+str
+cleanupTraces(void)
+{
+       clearTrace();
+       return MAL_SUCCEED;
+}
+
 void
 cachedProfilerEvent(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to