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

Keep the uuid around


diffs (26 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
@@ -171,9 +171,19 @@ renderProfilerEvent(Client cntxt, MalBlk
        logadd("\"tag\":"OIDFMT","PRETTIFY, stk?stk->tag:0);
        logadd("\"module\":\"%s\","PRETTIFY, pci->modname ? pci->modname : "" );
        logadd("\"instruction\":\"%s\","PRETTIFY, pci->fcnname ? pci->fcnname : 
"");
-       if( cntxt->uuid == 0)
-               cntxt->uuid = msab_getUUID(&cntxt->uuid);
-       logadd("\"session\":\"%s\","PRETTIFY, cntxt->uuid);
+    if (!GDKinmemory()) {
+        char *uuid;
+               str c;
+               if( cntxt->uuid)
+                               logadd("\"session\":\"%s\","PRETTIFY, 
cntxt->uuid);
+               else{
+                       if ((c = msab_getUUID(&uuid)) == NULL) {
+                               logadd("\"session\":\"%s\","PRETTIFY, uuid);
+                               cntxt->uuid = uuid;
+                       } else
+                               free(c);
+               }
+    }
        logadd("\"state\":\"%s\","PRETTIFY, start?"start":"done");
        logadd("\"usec\":"LLFMT","PRETTIFY, pci->ticks);
        
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to