Changeset: 48a43719e63d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48a43719e63d
Modified Files:
Branch: jacqueline
Log Message:
merged from default
diffs (truncated from 882 to 300 lines):
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
@@ -954,6 +954,7 @@ str BLOBblob_blob(blob **d, blob **s);
str BLOBblob_fromstr(blob **b, str *d);
void BLOBconvert(blob *b, int direction);
void BLOBdel(Heap *h, var_t *index);
+void BLOBdestroy(blob *b);
str BLOBeoln(char *src, char *end);
str BLOBfromblob(str *retval, blob **b);
str BLOBfromidx(str *retval, blob **binp, int *index);
@@ -5781,6 +5782,7 @@ str getName(str nme, size_t len);
int getPC(MalBlkPtr mb, InstrPtr p);
str getPipeCatalog(int *nme, int *def);
str getPipeDefinition(str name);
+stream *getProfilerStream(void);
str getRef;
str getRefName(MalBlkPtr mb, int i);
str getScenarioLanguage(Client c);
diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -21,10 +21,10 @@ The trace options:
S = monitor start of instruction profiling
a = aggregate clock ticks per instruction
e = event counter
- f = function name and pc counter
- o = module.function operation called
- i = interpreter thread number
- T = wall colck time
+ f = module.function name
+ i = instruction counter
+ I = interpreter thread number
+ T = wall clock time
t = ticks in microseconds
c = cpu statistics (utime,ctime,stime,cstime)
m = memory resources as provided by OS
@@ -35,6 +35,7 @@ The trace options:
y = MAL argument types
p = process statistics, e.g. page faults, context switches
u = user id
+ D = Generate dot file upon query start
# 19:24:05 >
# 19:24:05 > "Done."
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -19,54 +19,7 @@
/**
* stethoscope
- * Martin Kersten
- *
- * The Stethoscope
- * The performance profiler infrastructure provides
- * precisely control through annotation of a MAL program.
- * Often, however, inclusion of profiling statements is an afterthought.
- *
- * The program stethoscope addresses this situation by providing
- * a simple application that can attach itself to a running
- * server and extracts the profiler events from concurrent running queries.
- *
- * The arguments to @code{stethoscope} are the profiler properties to be traced
- * and the applicable filter expressions. For example,
- * stethoscope -t bat.insert algebra.join
- * tracks the microsecond ticks of two specific MAL instructions.
- * A synopsis of the calling conventions:
- * stethoscope [options] +[aefoTtcmibds] @{<mod>.<fcn> @}
- * -d | --dbname=<database_name>
- * -u | --user=<user>
- * -P | --password=<password>
- * -p | --port=<portnr>
- * -h | --host=<hostname>
- *
- * Event selector:
- * a =aggregates
- * e =event
- * f =function
- * i =instruction counter
- * I =interpreter thread
- * T =time
- * t =ticks
- * c =cpu statistics
- * m =memory resources
- * r =block reads
- * w =block writes
- * b =bytes read/written
- * s =statement
- * y =argument types
- * p =pgfaults,cntxtswitches
- * S =Start profiling instruction
- * D =Generate dot file upon query start
- *
- * Ideally, the stream of events should be piped into a
- * 2D graphical tool, like xosview (Linux).
- *
- * For a convenient way to watch most of the SQL interaction you may use
- * the command:
- * stethoscope -umonetdb -Pmonetdb -hhost +tis "algebra.*" "bat.*" "group.*"
"sql.*" "aggr.*"
+ * author Martin Kersten
*/
#include "monetdb_config.h"
@@ -91,6 +44,7 @@
# endif
#endif
+#define COUNTERSDEFAULT "ISTest"
static struct {
char tag;
@@ -131,6 +85,7 @@ static struct {
/* 0 */ { 'S', "start", "start", 0 },
/* 1 */ { 'y', "type", "type", 0 },
/* 2 */ { 'D', "dot", "dot", 0 },
+ /* 3 */ { 'F', "flow", "flow", 0 },
/* 3 */ { 0, 0, 0, 0 }
};
@@ -162,7 +117,7 @@ usage(void)
fprintf(stderr, " -p | --port=<portnr>\n");
fprintf(stderr, " -h | --host=<hostname>\n");
fprintf(stderr, "\n");
- fprintf(stderr, "The trace options:\n");
+ fprintf(stderr, "The trace options (default '%s'):\n",COUNTERSDEFAULT);
fprintf(stderr, " S = monitor start of instruction profiling\n");
fprintf(stderr, " a = aggregate clock ticks per instruction\n");
fprintf(stderr, " e = event counter\n");
@@ -181,6 +136,7 @@ usage(void)
fprintf(stderr, " p = process statistics, e.g. page faults, context
switches\n");
fprintf(stderr, " u = user id\n");
fprintf(stderr, " D = Generate dot file upon query start\n");
+ fprintf(stderr, " F = dataflow memory claims (in MB)\n");
}
/* Any signal should be captured and turned into a graceful
@@ -408,11 +364,13 @@ main(int argc, char **argv)
k= setCounter(argv[a] + 1);
a++;
} else
- k= setCounter("TtesDSI");
+ k= setCounter(COUNTERSDEFAULT);
- /* DOT needs PC */
- if( profileCounter[32].status )
+ /* DOT needs function id and PC to correlate */
+ if( profileCounter[32].status ) {
+ profileCounter[3].status= k++;
profileCounter[4].status= k;
+ }
if (user == NULL || password == NULL) {
fprintf(stderr, "%s: need -u and -P arguments\n", argv[0]);
diff --git a/gdk/gdk.mx b/gdk/gdk.mx
--- a/gdk/gdk.mx
+++ b/gdk/gdk.mx
@@ -2125,6 +2125,7 @@ typedef struct {
void (*atomConvert) (ptr v, int direction);
int (*atomFix) (ptr atom);
int (*atomUnfix) (ptr atom);
+ void (*atomDestroy) (ptr atom);
/* varsized atom-only ADT functions */
var_t (*atomPut) (Heap *, var_t *off, ptr src);
diff --git a/gdk/gdk_atoms.mx b/gdk/gdk_atoms.mx
--- a/gdk/gdk_atoms.mx
+++ b/gdk/gdk_atoms.mx
@@ -2350,64 +2350,44 @@ atomDesc BATatoms[MAXATOMS] = {
(int (*)(ptr, ptr)) lngCmp,
(BUN (*)(ptr)) lngHash, 0,
#endif
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"bit", TYPE_chr, 1, sizeof(bit), sizeof(bit), 0, 0, (ptr) &chr_nil,
(int (*)(str, int *, ptr *)) bitFromStr, (int (*)(str *, int *, ptr))
bitToStr,
(void *(*)(void *, stream *, size_t)) bitRead, (int (*)(void *, stream
*, size_t)) bitWrite,
(int (*)(ptr, ptr)) chrCmp,
(BUN (*)(ptr)) chrHash, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"chr", TYPE_chr, 1, sizeof(chr), sizeof(chr), 0, 0, (ptr) &chr_nil,
(int (*)(str, int *, ptr *)) chrFromStr, (int (*)(str *, int *, ptr))
chrToStr,
(void *(*)(void *, stream *, size_t)) chrRead, (int (*)(void *, stream
*, size_t)) chrWrite,
(int (*)(ptr, ptr)) chrCmp,
(BUN (*)(ptr)) chrHash, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"bte", TYPE_bte, 1, sizeof(bte), sizeof(bte), 0, 0, (ptr) &bte_nil,
(int (*)(str, int *, ptr *)) bteFromStr, (int (*)(str *, int *, ptr))
bteToStr,
(void *(*)(void *, stream *, size_t)) bteRead, (int (*)(void *, stream
*, size_t)) bteWrite,
(int (*)(ptr, ptr)) bteCmp,
(BUN (*)(ptr)) bteHash, 0,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"sht", TYPE_sht, 1, sizeof(sht), sizeof(sht), 0, 0, (ptr) &sht_nil,
(int (*)(str, int *, ptr *)) shtFromStr, (int (*)(str *, int *, ptr))
shtToStr,
(void *(*)(void *, stream *, size_t)) shtRead, (int (*)(void *, stream
*, size_t)) shtWrite,
(int (*)(ptr, ptr)) shtCmp,
(BUN (*)(ptr)) shtHash, (void (*)(ptr, int)) shtConvert,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"BAT", TYPE_int, 1, sizeof(bat), sizeof(bat), 0, 0, (ptr) &int_nil,
(int (*)(str, int *, ptr *)) batFromStr, (int (*)(str *, int *, ptr))
batToStr,
(void *(*)(void *, stream *, size_t)) batRead, (int (*)(void *, stream
*, size_t)) batWrite,
(int (*)(ptr, ptr)) intCmp,
(BUN (*)(ptr)) intHash, (void (*)(ptr, int)) intConvert,
(int (*)(ptr)) batFix, (int (*)(ptr)) batUnfix,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0},
{"int", TYPE_int, 1, sizeof(int), sizeof(int), 0, 0, (ptr) &int_nil,
(int (*)(str, int *, ptr *)) intFromStr, (int (*)(str *, int *, ptr))
intToStr,
(void *(*)(void *, stream *, size_t)) intRead, (int (*)(void *, stream
*, size_t)) intWrite,
(int (*)(ptr, ptr)) intCmp,
(BUN (*)(ptr)) intHash, (void (*)(ptr, int)) intConvert,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"oid",
#if SIZEOF_OID == SIZEOF_INT
TYPE_int, 1, sizeof(oid), sizeof(oid), 0, 0, (ptr) &int_nil,
@@ -2422,10 +2402,7 @@ atomDesc BATatoms[MAXATOMS] = {
(int (*)(ptr, ptr)) lngCmp,
(BUN (*)(ptr)) lngHash, (void (*)(ptr, int)) lngConvert,
#endif
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"wrd",
#if SIZEOF_WRD == SIZEOF_INT
TYPE_int, 1, sizeof(wrd), sizeof(wrd), 0, 0, (ptr) &int_nil,
@@ -2440,10 +2417,7 @@ atomDesc BATatoms[MAXATOMS] = {
(int (*)(ptr, ptr)) lngCmp,
(BUN (*)(ptr)) lngHash, (void (*)(ptr, int)) lngConvert,
#endif
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"ptr",
#if SIZEOF_VOID_P == SIZEOF_INT
TYPE_ptr, 1, sizeof(ptr), sizeof(ptr), 0, 0, (ptr) &ptr_nil,
@@ -2458,43 +2432,31 @@ atomDesc BATatoms[MAXATOMS] = {
(int (*)(ptr, ptr)) lngCmp,
(BUN (*)(ptr)) lngHash, (void (*)(ptr, int)) lngConvert,
#endif
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"flt", TYPE_flt, 1, sizeof(flt), sizeof(flt), 0, 0, (ptr) &flt_nil,
(int (*)(str, int *, ptr *)) fltFromStr, (int (*)(str *, int *, ptr))
fltToStr,
(void *(*)(void *, stream *, size_t)) fltRead, (int (*)(void *, stream
*, size_t)) fltWrite,
(int (*)(ptr, ptr)) fltCmp,
(BUN (*)(ptr)) intHash, (void (*)(ptr, int)) intConvert,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"dbl", TYPE_dbl, 1, sizeof(dbl), sizeof(dbl), 0, 0, (ptr) &dbl_nil,
(int (*)(str, int *, ptr *)) dblFromStr, (int (*)(str *, int *, ptr))
dblToStr,
(void *(*)(void *, stream *, size_t)) dblRead, (int (*)(void *, stream
*, size_t)) dblWrite,
(int (*)(ptr, ptr)) dblCmp,
(BUN (*)(ptr)) lngHash, (void (*)(ptr, int)) lngConvert,
- 0, 0,
- 0, 0,
- 0, 0,
- 0, 0},
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
{"lng", TYPE_lng, 1, sizeof(lng), sizeof(lng), 0, 0, (ptr) &lng_nil,
(int (*)(str, int *, ptr *)) lngFromStr, (int (*)(str *, int *, ptr))
lngToStr,
(void *(*)(void *, stream *, size_t)) lngRead, (int (*)(void *, stream
*, size_t)) lngWrite,
(int (*)(ptr, ptr)) lngCmp,
(BUN (*)(ptr)) lngHash, (void (*)(ptr, int)) lngConvert,
- 0, 0,
- 0, 0,
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list