Changeset: 203928aca87d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=203928aca87d
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/mal/mal.c
        monetdb5/mal/mal.h
        monetdb5/mal/mal_profiler.c
        monetdb5/tools/Tests/mserver5--help.stable.err
        sql/test/leaks/Tests/check0_bam.stable.out.int128
        tools/mserver/mserver5.c
Branch: default
Log Message:

Clean --trace option
The --trace option is stripped from its stethoscope directives,
as we now always produce the same event record.


diffs (115 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
@@ -2396,7 +2396,7 @@ int mal_init(void);
 MT_Lock mal_profileLock;
 str mal_quote(const char *msg, size_t size);
 MT_Lock mal_remoteLock;
-char *mal_trace;
+int mal_trace;
 void mal_unquote(char *msg);
 str manifoldRef;
 str mapiRef;
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -13,7 +13,7 @@
 char monet_cwd[PATHLENGTH] = { 0 };
 size_t monet_memory;
 char   monet_characteristics[PATHLENGTH];
-char *mal_trace;               /* enable profile events on console */
+int mal_trace;         /* enable profile events on console */
 
 #include "mal_stack.h"
 #include "mal_linker.h"
@@ -96,10 +96,10 @@ int mal_init(void){
                return -1;
        /* set up the profiler if needed, output sent to console */
        /* Use the same shortcuts as stethoscope */
-       if ( mal_trace && *mal_trace) {
+       if ( mal_trace ) {
                openProfilerStream(mal_clients[0].fdout);
                startProfiler(1,0);
-       } else mal_trace =0;
+       } 
        return 0;
 }
 /*
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -45,7 +45,7 @@ mal_export size_t     monet_memory;
 mal_export char        monet_characteristics[PATHLENGTH];
 mal_export lng                 memorypool;      /* memory claimed by 
concurrent threads */
 mal_export int                 memoryclaims;    /* number of threads active 
with expensive operations */
-mal_export char                *mal_trace;             /* enable profile 
events on console */
+mal_export int         mal_trace;              /* enable profile events on 
console */
 
 /*
    See gdk/gdk.mx for the definition of all debug masks.
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
@@ -400,7 +400,7 @@ MPresetProfiler(stream *fdout)
 {
        if (fdout != eventstream)
                return;
-       if (mal_trace)
+       if (mal_trace) // already traced on console
                return;
        MT_lock_set(&mal_profileLock, "MPresetProfiler");
        eventstream = 0;
diff --git a/monetdb5/tools/Tests/mserver5--help.stable.err 
b/monetdb5/tools/Tests/mserver5--help.stable.err
--- a/monetdb5/tools/Tests/mserver5--help.stable.err
+++ b/monetdb5/tools/Tests/mserver5--help.stable.err
@@ -32,7 +32,7 @@ The debug, testing & trace options:
      --algorithms
      --performance
      --optimizers
-     --trace[=<stethoscope flags>]
+     --trace
      --forcemito
      --recycler
      --debug=<bitmask>
diff --git a/sql/test/leaks/Tests/check0_bam.stable.out.int128 
b/sql/test/leaks/Tests/check0_bam.stable.out.int128
--- a/sql/test/leaks/Tests/check0_bam.stable.out.int128
+++ b/sql/test/leaks/Tests/check0_bam.stable.out.int128
@@ -77,7 +77,7 @@ Ready.
 % L1,  L2 # name
 % char,        wrd # type
 % 9,   3 # length
-[ "transient", 391     ]
+[ "transient", 407     ]
 #select 'persistent', count(*) from bbp() as bbp where kind like 'pers%';
 % .L1, .L2 # table_name
 % L1,  L2 # name
diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c
--- a/tools/mserver/mserver5.c
+++ b/tools/mserver/mserver5.c
@@ -96,7 +96,7 @@ usage(char *prog, int xit)
        fprintf(stderr, "     --algorithms\n");
        fprintf(stderr, "     --performance\n");
        fprintf(stderr, "     --optimizers\n");
-       fprintf(stderr, "     --trace[=<stethoscope flags>]\n");
+       fprintf(stderr, "     --trace\n");
        fprintf(stderr, "     --forcemito\n");
        fprintf(stderr, "     --recycler\n");
        fprintf(stderr, "     --debug=<bitmask>\n");
@@ -391,7 +391,7 @@ main(int argc, char **av)
                                break;
                        }
                        if (strcmp(long_options[option_index].name, "trace") == 
0) {
-                               mal_trace = optarg? optarg:"ISTest";
+                               mal_trace = 1;
                                break;
                        }
                        if (strcmp(long_options[option_index].name, "heaps") == 
0) {
@@ -433,7 +433,7 @@ main(int argc, char **av)
                        }
                        break;
                case 't':
-                       mal_trace = optarg? optarg:"ISTest";
+                       mal_trace = 1;
                        break;
                case '?':
                        /* a bit of a hack: look at the option that the
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to