Changeset: 1c182eb109eb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1c182eb109eb
Modified Files:
        gdk/gdk_tracer.h
        monetdb5/modules/mal/orderidx.c
        monetdb5/modules/mal/orderidx.h
Branch: tracer
Log Message:

Added GDKtracer to orderidx


diffs (62 lines):

diff --git a/gdk/gdk_tracer.h b/gdk/gdk_tracer.h
--- a/gdk/gdk_tracer.h
+++ b/gdk/gdk_tracer.h
@@ -67,6 +67,7 @@ typedef enum {
                MAL_WLC,
                MAL_REDUCE,
                MAL_CLIENT,
+               MAL_OIDX,
 
                // GDK
                GDK_ALL,
diff --git a/monetdb5/modules/mal/orderidx.c b/monetdb5/modules/mal/orderidx.c
--- a/monetdb5/modules/mal/orderidx.c
+++ b/monetdb5/modules/mal/orderidx.c
@@ -13,6 +13,7 @@
 #include "monetdb_config.h"
 #include "orderidx.h"
 #include "gdk.h"
+#include "gdk_tracer.h"
 
 #define MIN_PIECE      ((BUN) 1000)    /* TODO use realistic size in 
production */
 
@@ -91,10 +92,9 @@ OIDXcreateImplementation(Client cntxt, i
        } else if (BATcount(b) < (BUN) pieces || BATcount(b) < MIN_PIECE) {
                pieces = 1;
        }
-#ifdef _DEBUG_OIDX_
-       fprintf(stderr,"#bat.orderidx pieces %d\n",pieces);
-       fprintf(stderr,"#oidx ttype %s bat %s\n", 
ATOMname(b->ttype),ATOMname(tpe));
-#endif
+
+       DEBUG(MAL_OIDX, "Pieces: %d\n", pieces);
+       DEBUG(MAL_OIDX, "oidx ttype: %s - bat: %s\n", ATOMname(b->ttype), 
ATOMname(tpe));
 
        /* create a temporary MAL function to sort the BAT in parallel */
        snprintf(name, IDLENGTH, "sort%d", rand()%1000);
@@ -184,9 +184,11 @@ OIDXcreateImplementation(Client cntxt, i
                msg = runMALsequence(cntxt, smb, 1, 0, newstk, 0, 0);
                freeStack(newstk);
        }
-#ifdef _DEBUG_OIDX_
-       fprintFunction(stderr, smb, 0, LIST_MAL_ALL);
-#endif
+
+       /* CHECK */
+       // Uncomment this line when fprintfFunction is fixed
+       // fprintFunction(MAL_OIDX, smb, 0, LIST_MAL_ALL);
+
        /* get rid of temporary MAL block */
 bailout:
        freeSymbol(snew);
diff --git a/monetdb5/modules/mal/orderidx.h b/monetdb5/modules/mal/orderidx.h
--- a/monetdb5/modules/mal/orderidx.h
+++ b/monetdb5/modules/mal/orderidx.h
@@ -25,7 +25,6 @@
 #define orderidx_export extern
 #endif
 
-//#define _DEBUG_OIDX_
 orderidx_export str OIDXcreate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 orderidx_export str OIDXcreateImplementation(Client cntxt, int tpe, BAT *b, 
int pieces);
 orderidx_export str OIDXdropImplementation(Client cntxt, BAT *b);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to