Changeset: 9ed89e343077 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9ed89e343077
Added Files:
        sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.stable.err
        sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.stable.out
Modified Files:
        NT/installer32/cv64-32.sh
        NT/installer64/cv32-64.sh
        clients/mapiclient/stethoscope.c
        clients/mapiclient/tomograph.c
        clients/odbc/setup/Makefile.ag
        clients/odbc/winsetup/Makefile.ag
        gdk/gdk_atoms.c
        monetdb5/mal/mal.h
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_profiler.h
        sql/backends/monet5/sql_scenario.c
        sql/benchmarks/tpch/Tests/01-explain.stable.out
        sql/benchmarks/tpch/Tests/03-explain.stable.out
        sql/common/sql_types.c
        sql/server/rel_optimizer.c
        sql/server/sql_mvc.c
        sql/server/sql_parser.y
        sql/server/sql_scan.c
        sql/server/sql_scan.h
        sql/storage/store.c
        
sql/test/BugTracker-2009/Tests/old_views_incorrectly_reused.SF-2863804.view1.sql
        
sql/test/BugTracker-2009/Tests/old_views_incorrectly_reused.SF-2863804.view2.sql
        sql/test/BugTracker-2014/Tests/All
        sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.sql
        sql/test/BugTracker/Tests/between_with_column.SF-1959410.stable.err
        sql/test/pg_regress/Tests/date.sql
        sql/test/pg_regress/Tests/date.stable.err
        sql/test/pg_regress/Tests/date.stable.out
        sql/test/pg_regress/Tests/load.SQL.sh
        sql/test/pg_regress/Tests/time.sql
        sql/test/pg_regress/Tests/time.stable.err
        sql/test/pg_regress/Tests/time.stable.out
        sql/test/pg_regress/Tests/timestamp.sql
        sql/test/pg_regress/Tests/timestamp.stable.err
        sql/test/pg_regress/Tests/timestamp.stable.out
        sql/test/pg_regress/Tests/timestamptz.sql
        sql/test/pg_regress/Tests/timestamptz.stable.err
        sql/test/pg_regress/Tests/timestamptz.stable.out
        sql/test/pg_regress/Tests/timetz.sql
        sql/test/pg_regress/Tests/timetz.stable.err
        sql/test/pg_regress/Tests/timetz.stable.out
        sql/test/pg_regress/postgresql2sql99.sh
        testing/quicktest
Branch: transaction-replication
Log Message:

Merge with default branch


diffs (truncated from 8055 to 300 lines):

diff --git a/NT/installer32/cv64-32.sh b/NT/installer32/cv64-32.sh
--- a/NT/installer32/cv64-32.sh
+++ b/NT/installer32/cv64-32.sh
@@ -19,13 +19,13 @@
 # this script is mostly to document what I did, not for regular use.
 
 cp ../installer64/*.{vdproj,sln} .
-sed -i -e '/TargetPlatform/s/3:1/3:0/' \
-       -e 's/win64/win32/' \
-       -e 's/\[ProgramFiles64Folder\]/[ProgramFilesFolder]/' \
-       -e 's/C:\\\\Program Files.*\\\\Common Files\\\\Merge 
Modules\\\\Microsoft_VC100_CRT_x64.msm/C:\\\\Program Files\\\\Common 
Files\\\\Merge Modules\\\\Microsoft_VC100_CRT_x86.msm/' \
-       -e 's/"ProductCode" = "8:{.*/"ProductCode" = 
"8:{66BABD32-D69D-4A89-A7F3-2655D4CD0641}"/' \
-       -e 's/"PackageCode" = "8:{.*/"PackageCode" = 
"8:{D9B2D386-1461-43BC-9A63-93F1BA0D7921}"/' \
-       -e 's/"UpgradeCode" = 
"8:{95ACBC8C-BC4B-4901-AF70-48B54A5C20F7}"/"UpgradeCode" = 
"8:{C1F69378-3F5C-4120-8224-32F07D3458F3}"/' \
-       -e 's/"UpgradeCode" = 
"8:{8E6CDFDE-39B9-43D9-97B3-2440C012845C}"/"UpgradeCode" = 
"8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}"/' \
-       -e 's/"UpgradeCode" = 
"8:{839D3C90-B578-41E2-A004-431440F9E899}"/"UpgradeCode" = 
"8:{730C595B-DBA6-48D7-94B8-A98780AC92B6}"/' \
+sed -i~ -e '/TargetPlatform/s/3:1/3:0/' \
+       -e 's/win64/win32/' \
+       -e 's/\[ProgramFiles64Folder\]/[ProgramFilesFolder]/' \
+       -e 's/C:\\\\Program Files.*\\\\Common Files\\\\Merge 
Modules\\\\Microsoft_VC100_CRT_x64.msm/C:\\\\Program Files\\\\Common 
Files\\\\Merge Modules\\\\Microsoft_VC100_CRT_x86.msm/' \
+       -e 's/"ProductCode" = "8:{.*/"ProductCode" = 
"8:{66BABD32-D69D-4A89-A7F3-2655D4CD0641}"/' \
+       -e 's/"PackageCode" = "8:{.*/"PackageCode" = 
"8:{D9B2D386-1461-43BC-9A63-93F1BA0D7921}"/' \
+       -e 's/"UpgradeCode" = 
"8:{95ACBC8C-BC4B-4901-AF70-48B54A5C20F7}"/"UpgradeCode" = 
"8:{C1F69378-3F5C-4120-8224-32F07D3458F3}"/' \
+       -e 's/"UpgradeCode" = 
"8:{8E6CDFDE-39B9-43D9-97B3-2440C012845C}"/"UpgradeCode" = 
"8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}"/' \
+       -e 's/"UpgradeCode" = 
"8:{839D3C90-B578-41E2-A004-431440F9E899}"/"UpgradeCode" = 
"8:{730C595B-DBA6-48D7-94B8-A98780AC92B6}"/' \
     *.vdproj
diff --git a/NT/installer64/cv32-64.sh b/NT/installer64/cv32-64.sh
--- a/NT/installer64/cv32-64.sh
+++ b/NT/installer64/cv32-64.sh
@@ -19,13 +19,13 @@
 # this script is mostly to document what I did, not for regular use.
 
 cp ../installer32/*.{vdproj,sln} .
-sed -i -e '/TargetPlatform/s/3:0/3:1/' \
-       -e 's/win32/win64/' \
-       -e 's/\[ProgramFilesFolder\]/[ProgramFiles64Folder]/' \
-       -e 's/C:\\\\Program Files.*\\\\Common Files\\\\Merge 
Modules\\\\Microsoft_VC100_CRT_x86.msm/C:\\\\Program Files\\\\Common 
Files\\\\Merge Modules\\\\Microsoft_VC100_CRT_x86_x64.msm/' \
-       -e 's/"ProductCode" = "8:{.*/"ProductCode" = 
"8:{ACC32EDD-13CE-4079-A6E7-D9DD94DA42EE}"/' \
-       -e 's/"PackageCode" = "8:{.*/"PackageCode" = 
"8:{332EB6D8-73DD-48CA-83E7-BB1922FFE3BD}"/' \
-       -e 's/"UpgradeCode" = 
"8:{C1F69378-3F5C-4120-8224-32F07D3458F3}"/"UpgradeCode" = 
"8:{95ACBC8C-BC4B-4901-AF70-48B54A5C20F7}"/' \
-       -e 's/"UpgradeCode" = 
"8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}"/"UpgradeCode" = 
"8:{8E6CDFDE-39B9-43D9-97B3-2440C012845C}"/' \
-       -e 's/"UpgradeCode" = 
"8:{730C595B-DBA6-48D7-94B8-A98780AC92B6}"/"UpgradeCode" = 
"8:{839D3C90-B578-41E2-A004-431440F9E899}"/' \
+sed -i~ -e '/TargetPlatform/s/3:0/3:1/' \
+       -e 's/win32/win64/' \
+       -e 's/\[ProgramFilesFolder\]/[ProgramFiles64Folder]/' \
+       -e 's/C:\\\\Program Files.*\\\\Common Files\\\\Merge 
Modules\\\\Microsoft_VC100_CRT_x86.msm/C:\\\\Program Files\\\\Common 
Files\\\\Merge Modules\\\\Microsoft_VC100_CRT_x86_x64.msm/' \
+       -e 's/"ProductCode" = "8:{.*/"ProductCode" = 
"8:{ACC32EDD-13CE-4079-A6E7-D9DD94DA42EE}"/' \
+       -e 's/"PackageCode" = "8:{.*/"PackageCode" = 
"8:{332EB6D8-73DD-48CA-83E7-BB1922FFE3BD}"/' \
+       -e 's/"UpgradeCode" = 
"8:{C1F69378-3F5C-4120-8224-32F07D3458F3}"/"UpgradeCode" = 
"8:{95ACBC8C-BC4B-4901-AF70-48B54A5C20F7}"/' \
+       -e 's/"UpgradeCode" = 
"8:{92C89C36-0E86-45E1-B3D8-0D6C91108F30}"/"UpgradeCode" = 
"8:{8E6CDFDE-39B9-43D9-97B3-2440C012845C}"/' \
+       -e 's/"UpgradeCode" = 
"8:{730C595B-DBA6-48D7-94B8-A98780AC92B6}"/"UpgradeCode" = 
"8:{839D3C90-B578-41E2-A004-431440F9E899}"/' \
     *.vdproj
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -39,7 +39,7 @@
 # endif
 #endif
 
-#define COUNTERSDEFAULT "ISTest"
+#define COUNTERSDEFAULT "ISTestn"
 
 /* #define _DEBUG_STETHOSCOPE_*/
 
@@ -84,7 +84,8 @@ static struct {
        /*  2  */ { 'D', "dot", "dot", 0 },
        /*  3  */ { 'F', "flow", "flow", 0 },
        /*  4  */ { 'M', "footprint", "footprint", 0 },
-       /*  5  */ { 0, 0, 0, 0 }
+       /*  5  */ { 'n', "numa","numa",0},
+       /*  6  */ { 0, 0, 0, 0 }
 };
 
 static stream *conn = NULL;
@@ -112,6 +113,7 @@ usage(void)
        fprintf(stderr, "  c = cpu statistics (utime,ctime,stime,cstime)\n");
        fprintf(stderr, "  m = rss memory as provided by OS (in MB)\n");
        fprintf(stderr, "  M = memory footprint of non-persistent objects\n");
+       fprintf(stderr, "  n = numa intra socket data flow\n");
        fprintf(stderr, "  r = block reads\n");
        fprintf(stderr, "  w = block writes\n");
        fprintf(stderr, "  b = bytes read/written\n");
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -58,13 +58,11 @@
 
 /* #define FOOTPRINT */
 #ifdef FOOTPRINT
-#define COUNTERSDEFAULT "ISTestMmrw"
+#define COUNTERSDEFAULT "ISTestMmrwn"
 #else
-#define COUNTERSDEFAULT "ISTestmrw"
+#define COUNTERSDEFAULT "ISTestmrwn"
 #endif
 
-/* #define _DEBUG_TOMOGRAPH_*/
-
 static struct {
        char tag;
        char *ptag;     /* which profiler group counter is needed */
@@ -110,7 +108,8 @@ profileCounter[] = {
 #ifdef FOOTPRINT
        /*  5  */ { 'M', "footprint", "footprint", 0 },
 #endif
-       /*  6  */ { 0, 0, 0, 0 }
+       /*  6  */ { 'n', "numa", "numa", 0 },
+       /*  7  */ { 0, 0, 0, 0 }
 };
 
 typedef struct _wthread {
@@ -157,6 +156,57 @@ static FILE *gnudata;
 
 static int capturing=0;
 
+#define MAXTHREADS 1048
+#define MAXBOX 32678    /* should be > MAXTHREADS */
+
+static int crossings[MAXTHREADS][MAXTHREADS];
+static int target[MAXTHREADS];
+static int source[MAXTHREADS];
+
+static void
+showNumaHeatmap(void){
+       int i,j =0;
+       int max= 0;
+       FILE *f;
+
+       
+       f= fopen("tomograph_heatmap.csv","a");
+       if( f == NULL){
+               fprintf(stderr,"Can not create tomograph_heatmap.csv\n");
+               return;
+       }
+       for( i=0; i< MAXTHREADS; i++){
+               if( target[i])
+               for(j=MAXTHREADS-1; j>0 && crossings[i][j]; j--)
+                       ;
+               if (j > max) max =j;
+       }
+       for( i=0; i< max; i++)
+       if( target[i] && source[i] ){
+               for(j=0; j< max; j++)
+               if( target[j] && source[j])
+                       fprintf(stderr,"%d\t", crossings[i][j]);
+               fprintf(stderr,"\n");
+       }
+/*
+       for( i=0; i< max; i++)
+       if( target[i] || source[i])
+               fprintf(stderr,"%d\t",target[i]);
+       fprintf(stderr,"\n");
+       for( i=0; i< max; i++)
+       if( target[i] || source[i])
+               fprintf(stderr,"%d\t",source[i]);
+       fprintf(stderr,"\n");
+*/
+
+       for( i=0; i< MAXTHREADS; i++){
+               for(j=0; j< MAXTHREADS; j++)
+                       crossings[i][j]=0;
+               target[i]=0;
+               source[i]=0;
+       }
+}
+
 static void
 usage(void)
 {
@@ -293,8 +343,6 @@ stop_disconnect:
        }
 }
 
-#define MAXTHREADS 2048
-#define MAXBOX 32678    /* should be > MAXTHREADS */
 
 #define START 1
 #define DONE 2
@@ -303,6 +351,8 @@ stop_disconnect:
 #define WAIT 5
 #define GCOLLECT 6
 
+static char *statenames[]= 
{"","start","done","action","ping","wait","gccollect"};
+
 typedef struct BOX {
        int row;
        int color;
@@ -314,6 +364,7 @@ typedef struct BOX {
        lng reads, writes;
        char *stmt;
        char *fcn;
+       char *numa;
        int state;
 } Box;
 
@@ -1548,6 +1599,7 @@ static void createTomogram(void)
                        }
 
 
+
        fprintf(gnudata, "plot 0 notitle with lines\n");
        fprintf(gnudata, "unset for[i=%d:%d] object i\n", prevobject, object - 
1);
        prevobject = object - 1;
@@ -1556,6 +1608,7 @@ static void createTomogram(void)
        keepdata(filename);
        (void) fclose(gnudata);
        gnudata = 0;
+       showNumaHeatmap();
 
        // show follow up action only once
        if (atlas && atlaspage == atlas-1) {
@@ -1576,6 +1629,23 @@ static void createTomogram(void)
        }
 }
 
+/* The intra-thread flow is collected for later presentation */
+
+
+static void
+updateNumaHeatmap(int thread, char *numa){
+       char *c;
+       int t;
+       for( c= numa; *c && *c == '@';){
+               c++;
+               t =atoi(c);
+               crossings[thread][t]++;
+               target[thread]++;
+               source[t]++;
+               while(*c && *c !='@') c++;
+       }
+}
+
 /* the main issue to deal with in the analysis is
  * that the tomograph start can appear while the
  * system is already processing. This leads to
@@ -1586,19 +1656,23 @@ static void createTomogram(void)
  */
 
 static void
-update(int state, int thread, lng clkticks, lng ticks, lng memory, lng 
footprint, lng reads, lng writes, char *fcn, char *stmt)
+update(int state, int thread, lng clkticks, lng ticks, lng memory, char *numa, 
lng footprint, lng reads, lng writes, char *fcn, char *stmt)
 {
        int idx;
        Box b;
        char *s;
 
+       if (debug)
+               fprintf(stderr, "Update %s batch %d input %s %s" LLFMT" 
%s\n",(state>=0?statenames[state]:"unknown"),batch, 
(fcn?fcn:"(null)"),currentfunction,starttime,numa);
        /* ignore the flow of control statements 'function' and 'end' */
-       if (fcn && strncmp(fcn, "end ", 4) == 0) {
+       if (fcn && strncmp(fcn, "end ", 4) == 0)
                return;
-       }
+
        if (starttime == 0) {
                /* ignore all instructions up to the first function call, 
unless input comes from a file */
-               if (inputfile == NULL && (state >= PING || fcn == 0 || 
strncmp(fcn, "function", 8))) {
+               if (inputfile == NULL && (state >= PING || fcn == 0 )) {
+                       if (debug)
+                               fprintf(stderr, "Skip %s input 
%s\n",(state>=0?statenames[state]:"unknown"),fcn);
                        return;
                }
                if (debug)
@@ -1618,11 +1692,12 @@ update(int state, int thread, lng clktic
                return;
        }
        if (state == DONE && fcn && strncmp(fcn, "function", 8) == 0) {
+               if(debug)
+                       fprintf(stderr, "Leave function \"%s\" capture 
\"%s\"?\n", (currentfunction?currentfunction:""), fcn+9);
                if (currentfunction && strcmp(currentfunction, fcn+9) == 0) {
                        capturing--;
-#ifdef _DEBUG_TOMOGRAPH_
-                       fprintf(stderr, "Leave function %s capture %d\n", 
currentfunction, capturing);
-#endif
+                       if(debug)
+                               fprintf(stderr, "Leave function %s capture 
%d\n", currentfunction, capturing);
                        free(currentfunction);
                        currentfunction = 0;
                } else
@@ -1642,9 +1717,8 @@ update(int state, int thread, lng clktic
        }
 
        if (state == DONE && fcn && strncmp(fcn, "profiler.tomograph", 18) == 
0) {
-#ifdef _DEBUG_TOMOGRAPH_
-               fprintf(stderr, "Profiler.tomograph ends %d\n", batch);
-#endif
+               if( debug)
+                       fprintf(stderr, "Profiler.tomograph ends %d\n", batch);
                deactivateBeat();
                createTomogram();
                totalclkticks = 0; /* number of clock ticks reported */
@@ -1700,22 +1774,22 @@ update(int state, int thread, lng clktic
        idx = threads[thread];
        /* start of instruction box */
        if (state == START && thread < MAXTHREADS) {
-#ifdef _DEBUG_TOMOGRAPH_
-               fprintf(stderr, "Start box %s thread %d idx %d box %d\n", 
currentfunction, thread,idx,topbox);
-#endif
+               if(debug)
+                       fprintf(stderr, "Start box %s thread %d idx %d box 
%d\n", currentfunction, thread,idx,topbox);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to