Changeset: 3bd5184b8b33 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3bd5184b8b33
Modified Files:
        MonetDB.spec
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        clients/Tests/exports.stable.out
        debian/changelog
        misc/packages/deb/changelog
        misc/packages/rpm/changelog
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_profiler.h
        monetdb5/modules/mal/profiler.c
        sql/ChangeLog-Archive
Branch: Sep2022
Log Message:

Change openstream call single argument from string to integer.
The openstream call with zero arguments is deprecated and will be removed in 
the next release.


diffs (206 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -901,11 +901,12 @@ fi
   minimize, simplify and optimize the process of generating and processing
   profiler output, only the events marking the end of an operation are
   emitted in most cases and the emitted json messages themselves are
-  trimmed down to their essential fields. Furthermore the MAL instruction
-  profiler.openstream now has an overload that takes a single string
-  argument which can be set to "min" to turn on the profiler in minimal
-  mode which causes it to only emit general events and excludes individual
-  MAL instruction execution events from the profiler streams.
+  trimmed down to their essential fields. Furthermore, the MAL instruction
+  profiler.openstream now requires an integer as a single argument, "0" for
+  default behaviour or "4" to turn on the profiler in minimal mode,
+  which causes it to only emit general events and excludes individual MAL
+  instruction execution events from the profiler streams.
+  The MAL instruction profiler.openstream with zero arguments is deprecated.
 
 * Thu Aug 25 2022 Martin van Dinther <[email protected]> 
- 11.45.1-20220913
 - sql: Extended system view sys.users with columns: schema_path, max_memory,
diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -47780,7 +47780,7 @@ CMDopenProfilerStream;
 Start profiling the events, send to output stream
 profiler
 openstream
-pattern profiler.openstream(X_0:str):void 
+pattern profiler.openstream(X_0:int):void 
 CMDopenProfilerStream;
 Start profiling the events, send to output stream
 profiler
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -36205,7 +36205,7 @@ CMDopenProfilerStream;
 Start profiling the events, send to output stream
 profiler
 openstream
-pattern profiler.openstream(X_0:str):void 
+pattern profiler.openstream(X_0:int):void 
 CMDopenProfilerStream;
 Start profiling the events, send to output stream
 profiler
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1208,7 +1208,7 @@ const char *not_uniqueRef;
 const char *nth_valueRef;
 const char *ntileRef;
 const char *oidRef;
-str openProfilerStream(Client cntxt, str s);
+str openProfilerStream(Client cntxt, int m);
 const char *openRef;
 str operatorName(int i);
 void opt_pipes_reset(void);
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -74,11 +74,12 @@ monetdb (11.45.1) unstable; urgency=low
     minimize, simplify and optimize the process of generating and processing
     profiler output, only the events marking the end of an operation are
     emitted in most cases and the emitted json messages themselves are
-    trimmed down to their essential fields. Furthermore the MAL instruction
-    profiler.openstream now has an overload that takes a single string
-    argument which can be set to "min" to turn on the profiler in minimal
-    mode which causes it to only emit general events and excludes individual
-    MAL instruction execution events from the profiler streams.
+    trimmed down to their essential fields. Furthermore, the MAL instruction
+    profiler.openstream now requires an integer as a single argument, "0" for
+    default behaviour or "4" to turn on the profiler in minimal mode,
+    which causes it to only emit general events and excludes individual MAL
+    instruction execution events from the profiler streams.
+    The MAL instruction profiler.openstream with zero arguments is deprecated.
 
  -- Lucas Pereira <[email protected]>  Fri, 26 Aug 2022 
11:15:27 +0200
 
diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog
--- a/misc/packages/deb/changelog
+++ b/misc/packages/deb/changelog
@@ -74,11 +74,12 @@ monetdb (11.45.1) unstable; urgency=low
     minimize, simplify and optimize the process of generating and processing
     profiler output, only the events marking the end of an operation are
     emitted in most cases and the emitted json messages themselves are
-    trimmed down to their essential fields. Furthermore the MAL instruction
-    profiler.openstream now has an overload that takes a single string
-    argument which can be set to "min" to turn on the profiler in minimal
-    mode which causes it to only emit general events and excludes individual
-    MAL instruction execution events from the profiler streams.
+    trimmed down to their essential fields. Furthermore, the MAL instruction
+    profiler.openstream now requires an integer as a single argument, "0" for
+    default behaviour or "4" to turn on the profiler in minimal mode,
+    which causes it to only emit general events and excludes individual MAL
+    instruction execution events from the profiler streams.
+    The MAL instruction profiler.openstream with zero arguments is deprecated.
 
  -- Lucas Pereira <[email protected]>  Fri, 26 Aug 2022 
11:15:27 +0200
 
diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog
--- a/misc/packages/rpm/changelog
+++ b/misc/packages/rpm/changelog
@@ -49,11 +49,12 @@
   minimize, simplify and optimize the process of generating and processing
   profiler output, only the events marking the end of an operation are
   emitted in most cases and the emitted json messages themselves are
-  trimmed down to their essential fields. Furthermore the MAL instruction
-  profiler.openstream now has an overload that takes a single string
-  argument which can be set to "min" to turn on the profiler in minimal
-  mode which causes it to only emit general events and excludes individual
-  MAL instruction execution events from the profiler streams.
+  trimmed down to their essential fields. Furthermore, the MAL instruction
+  profiler.openstream now requires an integer as a single argument, "0" for
+  default behaviour or "4" to turn on the profiler in minimal mode,
+  which causes it to only emit general events and excludes individual MAL
+  instruction execution events from the profiler streams.
+  The MAL instruction profiler.openstream with zero arguments is deprecated.
 
 * Thu Aug 25 2022 Martin van Dinther <[email protected]> 
- 11.45.1-20220913
 - sql: Extended system view sys.users with columns: schema_path, max_memory,
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
@@ -670,7 +670,7 @@ profilerEvent(MalEvent *me, NonMalEvent 
 /* The first scheme dumps the events on a stream (and in the pool)
  */
 str
-openProfilerStream(Client cntxt, str s)
+openProfilerStream(Client cntxt, int m)
 {
        int j;
 
@@ -693,7 +693,9 @@ openProfilerStream(Client cntxt, str s)
                }
        }
        profilerStatus = -1;
-       if (s) profilerMode = 1;        /* Atm, just check if not NULL */
+       /* 4 activates minimal mode. 1 and 3 were used in prev MonetDB versions 
*/
+       /* else default is 0 of global var profilerMode */
+       if (m == 4) profilerMode = 1;
        maleventstream = cntxt->fdout;
        profilerUser = cntxt->user;
 
diff --git a/monetdb5/mal/mal_profiler.h b/monetdb5/mal/mal_profiler.h
--- a/monetdb5/mal/mal_profiler.h
+++ b/monetdb5/mal/mal_profiler.h
@@ -56,7 +56,7 @@ mal_export int profilerStatus;
 mal_export int profilerMode;
 
 mal_export void initProfiler(void);
-mal_export str openProfilerStream(Client cntxt, str s);
+mal_export str openProfilerStream(Client cntxt, int m);
 mal_export str closeProfilerStream(Client cntxt);
 
 mal_export void profilerEvent(MalEvent *me, NonMalEvent *nme);
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
@@ -50,12 +50,11 @@ CMDopenProfilerStream(Client cntxt, MalB
        (void) mb;
        (void) stk;
        (void) pc;
-       str s = NULL; // minimal flag
-
-       if (getArgType(mb, pc, 1) == TYPE_str)
-               s = *getArgReference_str(stk, pc, 1);
-
-       return openProfilerStream(cntxt, s);
+       int m = 0;
+       if (getArgType(mb, pc, 1) == TYPE_int && (pc->argc == 1 || pc->argc == 
2)) {
+               m = *getArgReference_int(stk, pc, 1);
+       }
+       return openProfilerStream(cntxt, m);
 }
 
 static str
@@ -227,7 +226,7 @@ mel_func profiler_init_funcs[] = {
  command("profiler", "getlimit", CMDgetprofilerlimit, false, "Get profiler 
limit", args(1,1, arg("",int))),
  command("profiler", "setlimit", CMDsetprofilerlimit, true, "Set profiler 
limit", args(1,2, arg("",void),arg("l",int))),
  pattern("profiler", "openstream", CMDopenProfilerStream, false, "Start 
profiling the events, send to output stream", args(1,1, arg("",void))),
-  pattern("profiler", "openstream", CMDopenProfilerStream, false, "Start 
profiling the events, send to output stream", args(1,2, arg("",void), 
arg("s",str))),
+ pattern("profiler", "openstream", CMDopenProfilerStream, false, "Start 
profiling the events, send to output stream", args(1,2, arg("",void), 
arg("m",int))),
  pattern("profiler", "closestream", CMDcloseProfilerStream, false, "Stop 
offline proviling", args(1,1, arg("",void))),
  command("profiler", "noop", CMDnoopProfiler, false, "Fetch any pending 
performance events", args(1,1, arg("",void))),
  pattern("profiler", "getTrace", CMDgetTrace, false, "Get the trace details of 
a specific event", args(1,2, batargany("",1),arg("e",str))),
diff --git a/sql/ChangeLog-Archive b/sql/ChangeLog-Archive
--- a/sql/ChangeLog-Archive
+++ b/sql/ChangeLog-Archive
@@ -16,11 +16,12 @@
   minimize, simplify and optimize the process of generating and processing
   profiler output, only the events marking the end of an operation are
   emitted in most cases and the emitted json messages themselves are
-  trimmed down to their essential fields. Furthermore the MAL instruction
-  profiler.openstream now has an overload that takes a single string
-  argument which can be set to "min" to turn on the profiler in minimal
-  mode which causes it to only emit general events and excludes individual
-  MAL instruction execution events from the profiler streams.
+  trimmed down to their essential fields. Furthermore, the MAL instruction
+  profiler.openstream now requires an integer as a single argument, "0" for
+  default behaviour or "4" to turn on the profiler in minimal mode,
+  which causes it to only emit general events and excludes individual MAL
+  instruction execution events from the profiler streams.
+  The MAL instruction profiler.openstream with zero arguments is deprecated.
 
 * Thu Aug 25 2022 Martin van Dinther <[email protected]> 
- 11.45.1-20220913
 - Extended system view sys.users with columns: schema_path, max_memory,
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to