Changeset: a67604790eaa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a67604790eaa
Modified Files:
monetdb5/mal/mal.h
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_profiler.c
Branch: default
Log Message:
Only print used algorithm in TRACE output.
diffs (56 lines):
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -92,6 +92,7 @@ mal_export void mal_reset(void);
#define LIST_MAL_MAPI 32 /* output Mapi compatible output */
#define LIST_MAL_REMOTE 64 /* output MAL for remote execution */
#define LIST_MAL_FLOW 128 /* output MAL dataflow dependencies */
+#define LIST_MAL_ALGO 256 /* output algorithm used */
#define LIST_MAL_CALL (LIST_MAL_NAME | LIST_MAL_VALUE )
#define LIST_MAL_DEBUG (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE |
LIST_MAL_PROPS | LIST_MAL_FLOW)
#define LIST_MAL_ALL (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE |
LIST_MAL_MAPI)
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
@@ -351,7 +351,7 @@ instruction2str(MalBlkPtr mb, MalStkPtr
case CMDcall:
case ASSIGNsymbol :
// is any variable explicit or used
- /* this code was meant to make it easy to detect functions
whose
+ /* this code was meant to make it easy to detect functions whose
* result variable was not used anywhere.
* It is not essential
for (i = 0; i < p->retc; i++)
@@ -484,12 +484,14 @@ instruction2str(MalBlkPtr mb, MalStkPtr
}
}
}
- const char *algo = MT_thread_getalgorithm();
- if (algo) {
- if (!copystring(&t, " # ", &len))
- return base;
- if (!copystring(&t, algo, &len))
- return base;
+ if (flg & LIST_MAL_ALGO) {
+ const char *algo = MT_thread_getalgorithm();
+ if (algo) {
+ if (!copystring(&t, " # ", &len))
+ return base;
+ if (!copystring(&t, algo, &len))
+ return base;
+ }
}
return base;
}
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
@@ -783,7 +783,7 @@ sqlProfilerEvent(Client cntxt, MalBlkPtr
return;
/* generate actual call statement */
- stmt = instruction2str(mb, stk, pci, LIST_MAL_ALL);
+ stmt = instruction2str(mb, stk, pci, LIST_MAL_ALL | LIST_MAL_ALGO);
c = stmt;
while (c && *c && (isspace((unsigned char)*c) || *c == '!'))
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list