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

Protect Dot file generation
It should be encapsulated in the profilerLock to avoid
intermingling of dot file output and concurrent events.


diffs (16 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
@@ -159,8 +159,11 @@ void
 profilerEvent(int idx, MalBlkPtr mb, MalStkPtr stk, int pc, int start)
 {
        if (mb->profiler == NULL) return;
-       if (profileCounter[PROFdot].status == 1 && start && pc == 0)
+       if (profileCounter[PROFdot].status == 1 && start && pc == 0){
+               mal_set_lock(mal_profileLock, "profileLock");
                showFlowGraph(mb,stk,"stethoscope");
+               mal_unset_lock(mal_profileLock, "profileLock");
+       }
        if (profileCounter[PROFstart].status == 0 && start)
                return;
        if (myname == 0)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to