Changeset: a97cf7b3d6e6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a97cf7b3d6e6
Added Files:
monetdb5/optimizer/opt_profiler.c
monetdb5/optimizer/opt_profiler.h
sql/scripts/46_profiler.sql
Modified Files:
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.int128
clients/Tests/exports.stable.out
clients/Tests/malcheck.stable.err
clients/mapiclient/Tests/mclient--help.stable.err
clients/mapiclient/Tests/mclient--help.stable.err.Windows
clients/mapiclient/Tests/stethoscope--help.stable.err
clients/mapiclient/Tests/tachograph--help.stable.err
clients/mapiclient/eventparser.c
clients/mapiclient/eventparser.h
clients/mapiclient/mclient.c
clients/mapiclient/stethoscope.c
clients/mapiclient/tachograph.c
clients/mapiclient/tomograph.c
clients/mapilib/mapi.c
clients/mapilib/mapi.h
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.err
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.single
monetdb5/mal/Tests/tst025.stable.out
monetdb5/mal/Tests/tst032.stable.out
monetdb5/mal/Tests/tst201.stable.out
monetdb5/mal/Tests/tst272.mal
monetdb5/mal/Tests/tst272.stable.out
monetdb5/mal/Tests/tst275.mal
monetdb5/mal/Tests/tst275.stable.out
monetdb5/mal/Tests/tst810.stable.out
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_client.c
monetdb5/mal/mal_client.h
monetdb5/mal/mal_function.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_listing.h
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_profiler.h
monetdb5/mal/mal_runtime.c
monetdb5/mal/mal_scenario.c
monetdb5/modules/mal/Tests/inspect05.stable.out.int128
monetdb5/modules/mal/Tests/tokenizer00.stable.out
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/profiler.h
monetdb5/modules/mal/profiler.mal
monetdb5/optimizer/Makefile.ag
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
monetdb5/optimizer/opt_wrapper.c
monetdb5/optimizer/optimizer.mal
sql/backends/monet5/sql.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/sql_upgrades.c
sql/benchmarks/ssbm/Tests/01-explain.stable.out
sql/benchmarks/ssbm/Tests/01-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/02-explain.stable.out
sql/benchmarks/ssbm/Tests/02-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/03-explain.stable.out
sql/benchmarks/ssbm/Tests/03-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/04-explain.stable.out
sql/benchmarks/ssbm/Tests/04-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/05-explain.stable.out
sql/benchmarks/ssbm/Tests/05-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/06-explain.stable.out
sql/benchmarks/ssbm/Tests/06-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/07-explain.stable.out
sql/benchmarks/ssbm/Tests/07-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/08-explain.stable.out
sql/benchmarks/ssbm/Tests/08-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/09-explain.stable.out
sql/benchmarks/ssbm/Tests/09-explain.stable.out.int128
sql/benchmarks/ssbm/Tests/10-explain.stable.out
sql/benchmarks/ssbm/Tests/10-explain.stable.out.int128
sql/benchmarks/tpch/Tests/01-explain.stable.out
sql/benchmarks/tpch/Tests/01-explain.stable.out.int128
sql/benchmarks/tpch/Tests/02-explain.stable.out
sql/benchmarks/tpch/Tests/03-explain.stable.out
sql/benchmarks/tpch/Tests/03-explain.stable.out.int128
sql/benchmarks/tpch/Tests/05-explain.stable.out
sql/benchmarks/tpch/Tests/05-explain.stable.out.int128
sql/benchmarks/tpch/Tests/06-explain.stable.out
sql/benchmarks/tpch/Tests/06-explain.stable.out.int128
sql/benchmarks/tpch/Tests/08-explain.stable.out
sql/benchmarks/tpch/Tests/08-explain.stable.out.int128
sql/benchmarks/tpch/Tests/09-explain.stable.out
sql/benchmarks/tpch/Tests/09-explain.stable.out.int128
sql/benchmarks/tpch/Tests/10-explain.stable.out
sql/benchmarks/tpch/Tests/10-explain.stable.out.int128
sql/benchmarks/tpch/Tests/12-explain.stable.out
sql/benchmarks/tpch/Tests/12-explain.stable.out.int128
sql/benchmarks/tpch/Tests/14-explain.stable.out
sql/benchmarks/tpch/Tests/14-explain.stable.out.int128
sql/benchmarks/tpch/Tests/15-explain.stable.out
sql/benchmarks/tpch/Tests/17-explain.stable.out
sql/benchmarks/tpch/Tests/17-explain.stable.out.int128
sql/benchmarks/tpch/Tests/19-explain.stable.out
sql/benchmarks/tpch/Tests/20-explain.stable.out
sql/jdbc/tests/Tests/Test_Dobjects.stable.out
sql/scripts/16_tracelog.sql
sql/scripts/Makefile.ag
sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.err
sql/test/BugTracker-2009/Tests/explain_gives_crash.SF-2741829.stable.out
sql/test/BugTracker-2010/Tests/crash_on_complex_join_exp.Bug-2353.stable.out
sql/test/BugTracker-2010/Tests/rank-over-crash.SF-2926454.stable.out.int128
sql/test/BugTracker-2010/Tests/with_row_number_crash.Bug-2631.stable.out
sql/test/BugTracker-2011/Tests/func_iter_vs_bulk.Bug-2826.stable.out
sql/test/BugTracker-2012/Tests/rewrite_like_into_likesubselect.Bug-3179.stable.out
sql/test/BugTracker-2012/Tests/table_functions_fail_after_restart-0.Bug-3063.stable.out
sql/test/BugTracker-2012/Tests/table_functions_fail_after_restart-1.Bug-3063.stable.out
sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out
sql/test/BugTracker-2013/Tests/between.Bug-3259.stable.out.int128
sql/test/BugTracker-2013/Tests/sort_void_crash.Bug-3341.stable.out
sql/test/BugTracker-2014/Tests/nil_2dec_lng.Bug-3592.stable.out
sql/test/BugTracker-2015/Tests/useless_casts.Bug-3756.stable.out
sql/test/BugTracker/Tests/explain.SF-1739353.stable.out
sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.stable.out
sql/test/BugTracker/Tests/with_row_number.SF-1898089.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.err
sql/test/Dependencies/Tests/Dependencies.stable.out
sql/test/Dependencies/Tests/Dependencies.stable.out.int128
sql/test/Tests/setoptimizer.stable.err
sql/test/Tests/setoptimizer.stable.out
sql/test/Tests/setoptimizer.stable.out.Windows
sql/test/Tests/systemfunctions.stable.out
sql/test/Tests/systemfunctions.stable.out.int128
sql/test/Users/Tests/dropManyUsers.Bug-3764.stable.out
sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.stable.out
sql/test/leaks/Tests/check0.stable.out
sql/test/leaks/Tests/check0.stable.out.int128
sql/test/leaks/Tests/check1.stable.out
sql/test/leaks/Tests/check1.stable.out.int128
sql/test/leaks/Tests/check2.stable.out
sql/test/leaks/Tests/check2.stable.out.int128
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check3.stable.out.int128
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check4.stable.out.int128
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/check5.stable.out.int128
sql/test/leaks/Tests/drop3.stable.out.int128
sql/test/leaks/Tests/select1.stable.out.int128
sql/test/leaks/Tests/select2.stable.out.int128
sql/test/leaks/Tests/temp1.stable.out.int128
sql/test/leaks/Tests/temp2.stable.out.int128
sql/test/leaks/Tests/temp3.stable.out
sql/test/leaks/Tests/temp3.stable.out.int128
sql/test/mergetables/Tests/mergequery.stable.out
sql/test/remote/Tests/partition_elim.stable.out
tools/mserver/mserver5.c
Branch: default
Log Message:
Merge with profiler branch.
diffs (truncated from 17556 to 300 lines):
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -40027,6 +40027,12 @@ pattern optimizer.prelude():void
address optimizer_prelude;
comment Initialize the optimizer
+pattern optimizer.profiler(mod:str,fcn:str):str
+address OPTwrapper;
+comment Collect properties for the profiler
+
+pattern optimizer.profiler():str
+address OPTwrapper;
pattern optimizer.querylog(mod:str,fcn:str):str
address OPTwrapper;
comment Collect SQL query statistics
@@ -40138,16 +40144,12 @@ address CMDcpustats;
comment Extract cpu statistics from the kernel
command profiler.cleanup():void
-address CMDcleanup;
+address CMDcleanupTraces;
comment Remove the temporary tables for profiling
-command profiler.closeStream():void
+command profiler.closestream():void
address CMDcloseProfilerStream;
-comment Stop sending the event records
-
-command profiler.dumpTrace():void
-address CMDdumpTrace;
-comment List the events collected
+comment Stop offline proviling
command profiler.getSystemTime():lng
address CMDgetSystemTime;
@@ -40173,37 +40175,21 @@ command profiler.noop():void
address CMDnoopProfiler;
comment Fetch any pending performance events
-pattern profiler.openStream(host:str,port:int):void
-address CMDsetProfilerStream;
-comment Send the log events to a stream
-
-pattern profiler.openStream(fnme:str):void
-address CMDsetProfilerFile;
-comment Send the log events to a file, stdout or console
-
-pattern profiler.openStream():void
+pattern profiler.openstream(mode:int):void
address CMDopenProfilerStream;
-comment Send the events to output stream
-
-command profiler.reset():void
-address CMDclearTrace;
-comment Clear the profiler traces
-
-command profiler.setHeartbeat(b:int):void
+comment Start profiling the events, sent to output stream
+
+command profiler.setheartbeat(b:int):void
address CMDsetHeartbeat;
comment Set heart beat performance tracing
pattern profiler.stop():void
address CMDstopProfiler;
-comment Stop performance tracing
-
-pattern profiler.stethoscope(b:int):void
-address CMDstethoscope;
-comment Start stethoscope profiling with heart beat
-
-pattern profiler.tomograph(b:int):void
-address CMDtomograph;
-comment Start tomograph profiler with heart beat
+comment Stop offline performance profiling
+
+pattern profiler.start():void
+address CMDstartProfiler;
+comment Start offline performance profiling
pattern
querylog.call(tick1:timestamp,tick2:timestamp,arg:str,tuples:wrd,xtime:lng,rtime:lng,cpu:int,iowait:int):void
address QLOGcall;
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -50958,6 +50958,12 @@ pattern optimizer.prelude():void
address optimizer_prelude;
comment Initialize the optimizer
+pattern optimizer.profiler(mod:str,fcn:str):str
+address OPTwrapper;
+comment Collect properties for the profiler
+
+pattern optimizer.profiler():str
+address OPTwrapper;
pattern optimizer.querylog(mod:str,fcn:str):str
address OPTwrapper;
comment Collect SQL query statistics
@@ -51069,16 +51075,12 @@ address CMDcpustats;
comment Extract cpu statistics from the kernel
command profiler.cleanup():void
-address CMDcleanup;
+address CMDcleanupTraces;
comment Remove the temporary tables for profiling
-command profiler.closeStream():void
+command profiler.closestream():void
address CMDcloseProfilerStream;
-comment Stop sending the event records
-
-command profiler.dumpTrace():void
-address CMDdumpTrace;
-comment List the events collected
+comment Stop offline proviling
command profiler.getSystemTime():lng
address CMDgetSystemTime;
@@ -51104,37 +51106,21 @@ command profiler.noop():void
address CMDnoopProfiler;
comment Fetch any pending performance events
-pattern profiler.openStream(host:str,port:int):void
-address CMDsetProfilerStream;
-comment Send the log events to a stream
-
-pattern profiler.openStream(fnme:str):void
-address CMDsetProfilerFile;
-comment Send the log events to a file, stdout or console
-
-pattern profiler.openStream():void
+pattern profiler.openstream(mode:int):void
address CMDopenProfilerStream;
-comment Send the events to output stream
-
-command profiler.reset():void
-address CMDclearTrace;
-comment Clear the profiler traces
-
-command profiler.setHeartbeat(b:int):void
+comment Start profiling the events, sent to output stream
+
+command profiler.setheartbeat(b:int):void
address CMDsetHeartbeat;
comment Set heart beat performance tracing
pattern profiler.stop():void
address CMDstopProfiler;
-comment Stop performance tracing
-
-pattern profiler.stethoscope(b:int):void
-address CMDstethoscope;
-comment Start stethoscope profiling with heart beat
-
-pattern profiler.tomograph(b:int):void
-address CMDtomograph;
-comment Start tomograph profiler with heart beat
+comment Stop offline performance profiling
+
+pattern profiler.start():void
+address CMDstartProfiler;
+comment Start offline performance profiling
pattern
querylog.call(tick1:timestamp,tick2:timestamp,arg:str,tuples:wrd,xtime:lng,rtime:lng,cpu:int,iowait:int):void
address QLOGcall;
diff --git a/clients/Tests/SQL-dump.stable.out
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -60,6 +60,7 @@ Ready.
SYSTEM SCHEMA bam
SYSTEM SCHEMA json
+SYSTEM SCHEMA profiler
SYSTEM SCHEMA sys
SYSTEM SCHEMA tmp
SYSTEM TABLE sys._columns
@@ -219,8 +220,6 @@ SYSTEM FUNCTION sys.point
SYSTEM FUNCTION sys.pointfromtext
SYSTEM FUNCTION sys.polyfromtext
SYSTEM FUNCTION sys.polygonfromtext
-SYSTEM FUNCTION sys.profiler_openstream
-SYSTEM FUNCTION sys.profiler_stethoscope
SYSTEM FUNCTION sys.quantile
SYSTEM FUNCTION sys.querycache
SYSTEM FUNCTION sys.querylog
diff --git a/clients/Tests/SQL-dump.stable.out.int128
b/clients/Tests/SQL-dump.stable.out.int128
--- a/clients/Tests/SQL-dump.stable.out.int128
+++ b/clients/Tests/SQL-dump.stable.out.int128
@@ -56,6 +56,7 @@ Ready.
SYSTEM SCHEMA bam
SYSTEM SCHEMA json
+SYSTEM SCHEMA profiler
SYSTEM SCHEMA sys
SYSTEM SCHEMA tmp
SYSTEM TABLE sys._columns
@@ -215,8 +216,6 @@ SYSTEM FUNCTION sys.point
SYSTEM FUNCTION sys.pointfromtext
SYSTEM FUNCTION sys.polyfromtext
SYSTEM FUNCTION sys.polygonfromtext
-SYSTEM FUNCTION sys.profiler_openstream
-SYSTEM FUNCTION sys.profiler_stethoscope
SYSTEM FUNCTION sys.quantile
SYSTEM FUNCTION sys.querycache
SYSTEM FUNCTION sys.querylog
@@ -1000,8 +999,6 @@ create function pointfromtext(wkt string
create function polyfromtext(wkt string, srid smallint) returns polygon
external name geom."PolyFromText";
-- alias
create function polygonfromtext(wkt string, srid smallint) returns polygon
external name geom."PolyFromText";
-create procedure profiler_openstream(host string, port int) external name
profiler."openStream";
-create procedure profiler_stethoscope(ticks int) external name
profiler.stethoscope;
create aggregate quantile(val tinyint, q double) returns tinyint
external name "aggr"."quantile";
create aggregate quantile(val smallint, q double) returns smallint
@@ -1683,153 +1680,153 @@ 6016 "minflt" "bigint" 64 0
6020 NULL tr
6017 "majflt" "bigint" 64 0 6020 NULL true
10 NULL
6018 "nvcsw" "bigint" 64 0 6020 NULL true 11
NULL
6019 "stmt" "clob" 0 0 6020 NULL true 12 NULL
-6154 "user" "clob" 0 0 6160 NULL true 0 NULL
-6155 "login" "timestamp" 7 0 6160 NULL true 1
NULL
-6156 "sessiontimeout" "bigint" 64 0 6160 NULL
true 2 NULL
-6157 "lastcommand" "timestamp" 7 0 6160 NULL true
3 NULL
-6158 "querytimeout" "bigint" 64 0 6160 NULL true
4 NULL
-6159 "active" "boolean" 1 0 6160 NULL true
5 NULL
-6237 "name" "clob" 0 0 6240 NULL true 0 NULL
-6238 "def" "clob" 0 0 6240 NULL true 1 NULL
-6239 "status" "clob" 0 0 6240 NULL true 2
NULL
-6246 "name" "clob" 0 0 6248 NULL true 0 NULL
-6247 "value" "clob" 0 0 6248 NULL true 1 NULL
-6284 "qtag" "bigint" 64 0 6292 NULL true 0
NULL
-6285 "user" "clob" 0 0 6292 NULL true 1 NULL
-6286 "started" "timestamp" 7 0 6292 NULL true
2 NULL
-6287 "estimate" "timestamp" 7 0 6292 NULL true
3 NULL
-6288 "progress" "int" 32 0 6292 NULL true 4
NULL
-6289 "status" "clob" 0 0 6292 NULL true 5
NULL
-6290 "tag" "oid" 63 0 6292 NULL true 6 NULL
-6291 "query" "clob" 0 0 6292 NULL true 7 NULL
-6318 "rowid" "bigint" 64 0 6322 NULL true 0
NULL
-6319 "fldid" "int" 32 0 6322 NULL true 1 NULL
-6320 "message" "clob" 0 0 6322 NULL true 2
NULL
-6321 "input" "clob" 0 0 6322 NULL true 3 NULL
-6977 "keyword" "varchar" 40 0 6980 NULL false
0 NULL
-6982 "table_type_id" "smallint" 16 0 6988 NULL false
0 NULL
-6985 "table_type_name" "varchar" 25 0 6988 NULL
false 1 NULL
-6990 "dependency_type_id" "smallint" 16 0 6996 NULL
false 0 NULL
-6993 "dependency_type_name" "varchar" 15 0 6996 NULL
false 1 NULL
-7011 "file_id" "int" 32 0 7013 NULL true 0
NULL
-7012 "location" "char" 256 0 7013 NULL true 1
NULL
-7015 "dim_id" "int" 32 0 7019 NULL true 0
NULL
-7016 "file_id" "int" 32 0 7019 NULL true 1
NULL
-7017 "name" "varchar" 64 0 7019 NULL true 2
NULL
-7018 "length" "int" 32 0 7019 NULL true 3
NULL
-7021 "var_id" "int" 32 0 7027 NULL true 0
NULL
-7022 "file_id" "int" 32 0 7027 NULL true 1
NULL
-7023 "name" "varchar" 64 0 7027 NULL true 2
NULL
-7024 "vartype" "varchar" 64 0 7027 NULL true
3 NULL
-7025 "ndim" "int" 32 0 7027 NULL true 4 NULL
-7026 "coord_dim_id" "int" 32 0 7027 NULL true 5
NULL
-7029 "var_id" "int" 32 0 7033 NULL true 0
NULL
-7030 "dim_id" "int" 32 0 7033 NULL true 1
NULL
-7031 "file_id" "int" 32 0 7033 NULL true 2
NULL
-7032 "dimpos" "int" 32 0 7033 NULL true 3
NULL
-7035 "obj_name" "varchar" 256 0 7041 NULL true
0 NULL
-7036 "att_name" "varchar" 256 0 7041 NULL true
1 NULL
-7037 "att_type" "varchar" 64 0 7041 NULL true
2 NULL
-7038 "value" "clob" 0 0 7041 NULL true 3 NULL
-7039 "file_id" "int" 32 0 7041 NULL true 4
NULL
-7040 "gr_name" "varchar" 256 0 7041 NULL true
5 NULL
-7066 "schema" "clob" 0 0 7080 NULL true 0
NULL
-7067 "table" "clob" 0 0 7080 NULL true 1 NULL
-7068 "column" "clob" 0 0 7080 NULL true 2
NULL
-7069 "type" "clob" 0 0 7080 NULL true 3 NULL
-7070 "mode" "clob" 0 0 7080 NULL true 4 NULL
-7071 "location" "clob" 0 0 7080 NULL true 5
NULL
-7072 "count" "bigint" 64 0 7080 NULL true 6
NULL
-7073 "typewidth" "int" 32 0 7080 NULL true 7
NULL
-7074 "columnsize" "bigint" 64 0 7080 NULL true
8 NULL
-7075 "heapsize" "bigint" 64 0 7080 NULL true
9 NULL
-7076 "hashes" "bigint" 64 0 7080 NULL true
10 NULL
-7077 "phash" "boolean" 1 0 7080 NULL true 11
NULL
-7078 "imprints" "bigint" 64 0 7080 NULL true
12 NULL
-7079 "sorted" "boolean" 1 0 7080 NULL true
13 NULL
-7082 "schema" "clob" 0 0 7092 NULL true 0
NULL
-7083 "table" "clob" 0 0 7092 NULL true 1 NULL
-7084 "column" "clob" 0 0 7092 NULL true 2
NULL
-7085 "type" "clob" 0 0 7092 NULL true 3 NULL
-7086 "typewidth" "int" 32 0 7092 NULL true 4
NULL
-7087 "count" "bigint" 64 0 7092 NULL true 5
NULL
-7088 "distinct" "bigint" 64 0 7092 NULL true
6 NULL
-7089 "atomwidth" "int" 32 0 7092 NULL true 7
NULL
-7090 "reference" "boolean" 1 0 7092 NULL true
8 NULL
-7091 "sorted" "boolean" 1 0 7092 NULL true
9 NULL
-7130 "schema" "clob" 0 0 7140 NULL true 0
NULL
-7131 "table" "clob" 0 0 7140 NULL true 1 NULL
-7132 "column" "clob" 0 0 7140 NULL true 2
NULL
-7133 "type" "clob" 0 0 7140 NULL true 3 NULL
-7134 "count" "bigint" 64 0 7140 NULL true 4
NULL
-7135 "columnsize" "bigint" 64 0 7140 NULL true
5 NULL
-7136 "heapsize" "bigint" 64 0 7140 NULL true
6 NULL
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list