Changeset: f2f2acafe77d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f2f2acafe77d
Modified Files:
        gdk/gdk.h
        gdk/gdk_aggr.c
        gdk/gdk_align.c
        gdk/gdk_bat.c
        gdk/gdk_batop.c
        gdk/gdk_cand.c
        gdk/gdk_cross.c
        gdk/gdk_delta.c
        gdk/gdk_delta.h
        gdk/gdk_group.c
        gdk/gdk_hash.c
        gdk/gdk_heap.c
        gdk/gdk_imprints.c
        gdk/gdk_join.c
        gdk/gdk_orderidx.c
        gdk/gdk_posix.c
        gdk/gdk_private.h
        gdk/gdk_project.c
        gdk/gdk_sample.c
        gdk/gdk_select.c
        gdk/gdk_storage.c
        gdk/gdk_string.c
        gdk/gdk_system.c
        gdk/gdk_system.h
        gdk/gdk_unique.c
        gdk/gdk_utils.c
        geom/monetdb5/geom.c
        monetdb5/mal/mal_client.c
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_factory.c
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_parser.c
        monetdb5/mal/mal_resolve.c
        monetdb5/mal/mal_resource.c
        monetdb5/mal/mal_session.c
        monetdb5/modules/atoms/inet.c
        monetdb5/modules/mal/groupby.c
        monetdb5/modules/mal/mal_mapi.c
        monetdb5/modules/mal/manifold.c
        monetdb5/modules/mal/oltp.c
        monetdb5/modules/mal/orderidx.c
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/remote.c
        monetdb5/modules/mal/tablet.c
        monetdb5/modules/mal/wlc.c
        monetdb5/optimizer/opt_aliases.c
        monetdb5/optimizer/opt_candidates.c
        monetdb5/optimizer/opt_coercion.c
        monetdb5/optimizer/opt_commonTerms.c
        monetdb5/optimizer/opt_constants.c
        monetdb5/optimizer/opt_costModel.c
        monetdb5/optimizer/opt_dataflow.c
        monetdb5/optimizer/opt_deadcode.c
        monetdb5/optimizer/opt_emptybind.c
        monetdb5/optimizer/opt_evaluate.c
        monetdb5/optimizer/opt_garbageCollector.c
        monetdb5/optimizer/opt_generator.c
        monetdb5/optimizer/opt_inline.c
        monetdb5/optimizer/opt_jit.c
        monetdb5/optimizer/opt_json.c
        monetdb5/optimizer/opt_macro.c
        monetdb5/optimizer/opt_matpack.c
        monetdb5/optimizer/opt_mergetable.c
        monetdb5/optimizer/opt_mitosis.c
        monetdb5/optimizer/opt_multiplex.c
        monetdb5/optimizer/opt_oltp.c
        monetdb5/optimizer/opt_postfix.c
        monetdb5/optimizer/opt_profiler.c
        monetdb5/optimizer/opt_projectionpath.c
        monetdb5/optimizer/opt_pushselect.c
        monetdb5/optimizer/opt_querylog.c
        monetdb5/optimizer/opt_reduce.c
        monetdb5/optimizer/opt_remap.c
        monetdb5/optimizer/opt_remoteQueries.c
        monetdb5/optimizer/opt_reorder.c
        monetdb5/optimizer/opt_volcano.c
        monetdb5/optimizer/opt_wlc.c
        monetdb5/scheduler/run_memo.c
        monetdb5/scheduler/run_pipeline.c
        sql/backends/monet5/sql_execute.c
        sql/backends/monet5/sql_optimizer.c
        sql/backends/monet5/sql_orderidx.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_statistics.c
        sql/backends/monet5/sql_user.c
        sql/backends/monet5/vaults/bam/bam_loader.c
        sql/backends/monet5/vaults/bam/bam_wrapper.c
        sql/backends/monet5/vaults/fits/fits.c
        sql/backends/monet5/vaults/lidar/lidar.c
        sql/backends/monet5/wlr.c
        sql/include/sql_mem.h
        sql/server/rel_optimizer.c
        sql/server/sql_atom.c
        sql/server/sql_mvc.c
        sql/server/sql_privileges.c
        sql/server/sql_symbol.c
        sql/storage/store.c
Branch: gdk_tracer
Log Message:

Renamed macro DEBUG to TRC_DEBUG - conflicts with other libs


diffs (truncated from 6726 to 300 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1960,7 +1960,7 @@ gdk_export str GDKstrndup(const char *s,
        ({                                              \
                size_t _size = (s);                             \
                void *_res = GDKmalloc(_size);          \
-               DEBUG(ALLOC, "GDKmalloc(%zu) -> %p\n",          \
+               TRC_DEBUG(ALLOC, "GDKmalloc(%zu) -> %p\n",              \
                                        _size, _res);   \
                _res;           \
        })
@@ -1968,7 +1968,7 @@ gdk_export str GDKstrndup(const char *s,
        ({                                              \
                size_t _size = (s);                             \
                void *_res = GDKzalloc(_size);          \
-               DEBUG(ALLOC, "GDKzalloc(%zu) -> %p\n",          \
+               TRC_DEBUG(ALLOC, "GDKzalloc(%zu) -> %p\n",              \
                                        _size, _res);   \
                _res;           \
        })
@@ -1977,7 +1977,7 @@ gdk_export str GDKstrndup(const char *s,
                void *_ptr = (p);                       \
                size_t _size = (s);             \
                void *_res = GDKrealloc(_ptr, _size);           \
-               DEBUG(ALLOC, "GDKrealloc(%p,%zu) -> %p\n",      \
+               TRC_DEBUG(ALLOC, "GDKrealloc(%p,%zu) -> %p\n",  \
                                        _ptr, _size, _res);             \
                _res;   \
         })
@@ -1985,14 +1985,14 @@ gdk_export str GDKstrndup(const char *s,
        ({                                                              \
                void *_ptr = (p);               \
                if (_ptr)                                       \
-                       DEBUG(ALLOC, "GDKfree(%p)\n", _ptr);    \
+                       TRC_DEBUG(ALLOC, "GDKfree(%p)\n", _ptr);        \
                GDKfree(_ptr);          \
        })
 #define GDKstrdup(s)                   \
        ({                                              \
                const char *_str = (s);         \
                void *_res = GDKstrdup(_str);           \
-               DEBUG(ALLOC, "GDKstrdup(len=%zu) -> %p\n",      \
+               TRC_DEBUG(ALLOC, "GDKstrdup(len=%zu) -> %p\n",  \
                                        _str ? strlen(_str) : 0, _res); \
                _res;           \
        })
@@ -2001,7 +2001,7 @@ gdk_export str GDKstrndup(const char *s,
                const char *_str = (s);         \
                size_t _n = (n);                \
                void *_res = GDKstrndup(_str, _n);              \
-               DEBUG(ALLOC, "GDKstrndup(len=%zu) -> %p\n", \
+               TRC_DEBUG(ALLOC, "GDKstrndup(len=%zu) -> %p\n", \
                                        _n,     _res);                  \
                _res;                                   \
        })
@@ -2011,7 +2011,7 @@ gdk_export str GDKstrndup(const char *s,
                int _mode = (m);                        \
                size_t _len = (l);                                      \
                void *_res = GDKmmap(_path, _mode, _len);       \
-               DEBUG(ALLOC, "GDKmmap(%s,0x%x,%zu) -> %p\n",\
+               TRC_DEBUG(ALLOC, "GDKmmap(%s,0x%x,%zu) -> %p\n",\
                                        _path ? _path : "NULL",         \
                                        (unsigned) _mode, _len,         \
                                        _res);                          \
@@ -2021,7 +2021,7 @@ gdk_export str GDKstrndup(const char *s,
        ({                              \
                size_t _size = (s);                     \
                void *_res = malloc(_size);             \
-               DEBUG(ALLOC, "malloc(%zu) -> %p\n", \
+               TRC_DEBUG(ALLOC, "malloc(%zu) -> %p\n", \
                                        _size, _res);   \
                _res;                   \
        })
@@ -2030,7 +2030,7 @@ gdk_export str GDKstrndup(const char *s,
                size_t _nmemb = (n);            \
                size_t _size = (s);                             \
                void *_res = calloc(_nmemb,_size);              \
-               DEBUG(ALLOC, "calloc(%zu,%zu) -> %p\n",         \
+               TRC_DEBUG(ALLOC, "calloc(%zu,%zu) -> %p\n",             \
                                        _nmemb, _size, _res);   \
                _res;                   \
        })
@@ -2039,14 +2039,14 @@ gdk_export str GDKstrndup(const char *s,
                void *_ptr = (p);                       \
                size_t _size = (s);             \
                void *_res = realloc(_ptr, _size);              \
-               DEBUG(ALLOC, "realloc(%p,%zu) -> %p\n",         \
+               TRC_DEBUG(ALLOC, "realloc(%p,%zu) -> %p\n",             \
                                        _ptr, _size, _res);             \
                _res;                   \
         })
 #define free(p)                        \
        ({                              \
                void *_ptr = (p);       \
-               DEBUG(ALLOC, "free(%p)\n", _ptr);       \
+               TRC_DEBUG(ALLOC, "free(%p)\n", _ptr);   \
                free(_ptr);                     \
        })
 #else
@@ -2054,7 +2054,7 @@ static inline void *
 GDKmalloc_debug(size_t size)
 {
        void *res = GDKmalloc(size);
-       DEBUG(ALLOC, "GDKmalloc(%zu) -> %p\n", size, res);
+       TRC_DEBUG(ALLOC, "GDKmalloc(%zu) -> %p\n", size, res);
        return res;
 }
 #define GDKmalloc(s)   GDKmalloc_debug((s))
@@ -2062,7 +2062,7 @@ static inline void *
 GDKzalloc_debug(size_t size)
 {
        void *res = GDKzalloc(size);
-       DEBUG(ALLOC, "GDKzalloc(%zu) -> %p\n",
+       TRC_DEBUG(ALLOC, "GDKzalloc(%zu) -> %p\n",
                                  size, res);
        return res;
 }
@@ -2071,7 +2071,7 @@ static inline void *
 GDKrealloc_debug(void *ptr, size_t size)
 {
        void *res = GDKrealloc(ptr, size);
-       DEBUG(ALLOC, "GDKrealloc(%p,%zu) -> %p\n",
+       TRC_DEBUG(ALLOC, "GDKrealloc(%p,%zu) -> %p\n",
                                ptr, size, res);
        return res;
 }
@@ -2079,7 +2079,7 @@ GDKrealloc_debug(void *ptr, size_t size)
 static inline void
 GDKfree_debug(void *ptr)
 {
-       DEBUG(ALLOC, "GDKfree(%p)\n", ptr);
+       TRC_DEBUG(ALLOC, "GDKfree(%p)\n", ptr);
        GDKfree(ptr);
 }
 #define GDKfree(p)     GDKfree_debug((p))
@@ -2087,7 +2087,7 @@ static inline char *
 GDKstrdup_debug(const char *str)
 {
        void *res = GDKstrdup(str);
-       DEBUG(ALLOC, "GDKstrdup(len=%zu) -> %p\n",
+       TRC_DEBUG(ALLOC, "GDKstrdup(len=%zu) -> %p\n",
                                str ? strlen(str) : 0, res);
        return res;
 }
@@ -2096,7 +2096,7 @@ static inline char *
 GDKstrndup_debug(const char *str, size_t n)
 {
        void *res = GDKstrndup(str, n);
-       DEBUG(ALLOC, "GDKstrndup(len=%zu) -> %p\n", n, res);
+       TRC_DEBUG(ALLOC, "GDKstrndup(len=%zu) -> %p\n", n, res);
        return res;
 }
 #define GDKstrndup(s, n)       GDKstrndup_debug((s), (n))
@@ -2104,7 +2104,7 @@ static inline void *
 GDKmmap_debug(const char *path, int mode, size_t len)
 {
        void *res = GDKmmap(path, mode, len);
-       DEBUG(ALLOC, "GDKmmap(%s,0x%x,%zu) -> %p\n",
+       TRC_DEBUG(ALLOC, "GDKmmap(%s,0x%x,%zu) -> %p\n",
                                path ? path : "NULL", mode, len,
                                res);
        return res;
@@ -2114,7 +2114,7 @@ static inline void *
 malloc_debug(size_t size)
 {
        void *res = malloc(size);
-       DEBUG(ALLOC, "malloc(%zu) -> %p\n", size, res);
+       TRC_DEBUG(ALLOC, "malloc(%zu) -> %p\n", size, res);
        return res;
 }
 #define malloc(s)      malloc_debug((s))
@@ -2122,7 +2122,7 @@ static inline void *
 calloc_debug(size_t nmemb, size_t size)
 {
        void *res = calloc(nmemb, size);
-       DEBUG(ALLOC, "calloc(%zu,%zu) -> %p\n", nmemb, size, res);
+       TRC_DEBUG(ALLOC, "calloc(%zu,%zu) -> %p\n", nmemb, size, res);
        return res;
 }
 #define calloc(n, s)   calloc_debug((n), (s))
@@ -2130,14 +2130,14 @@ static inline void *
 realloc_debug(void *ptr, size_t size)
 {
        void *res = realloc(ptr, size);
-       DEBUG(ALLOC, "realloc(%p,%zu) -> %p \n", ptr, size, res);
+       TRC_DEBUG(ALLOC, "realloc(%p,%zu) -> %p \n", ptr, size, res);
        return res;
 }
 #define realloc(p, s)  realloc_debug((p), (s))
 static inline void
 free_debug(void *ptr)
 {
-       DEBUG(ALLOC, "free(%p)\n", ptr);
+       TRC_DEBUG(ALLOC, "free(%p)\n", ptr);
        free(ptr);
 }
 #define free(p)        free_debug((p))
@@ -2302,7 +2302,7 @@ BBPcheck(bat x, const char *y)
                assert(x > 0);
 
                if (x < 0 || x >= getBBPsize() || BBP_logical(x) == NULL) {
-                       DEBUG(CHECK_, "%s: range error %d\n", y, (int) x);
+                       TRC_DEBUG(CHECK_, "%s: range error %d\n", y, (int) x);
                } else {
                        return x;
                }
diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -949,7 +949,7 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT 
                bn = NULL;
        }
 
-       DEBUG(ALGO, 
"%s(b="ALGOBATFMT",g="ALGOOPTBATFMT",e="ALGOOPTBATFMT",s="ALGOOPTBATFMT")="ALGOOPTBATFMT":
 %s; "
+       TRC_DEBUG(ALGO, 
"%s(b="ALGOBATFMT",g="ALGOOPTBATFMT",e="ALGOOPTBATFMT",s="ALGOOPTBATFMT")="ALGOOPTBATFMT":
 %s; "
                                "start " OIDFMT ", count " BUNFMT " (" LLFMT " 
usec)\n",
                                __func__,
                                ALGOBATPAR(b), ALGOOPTBATPAR(g), 
ALGOOPTBATPAR(e),
@@ -1075,7 +1075,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s
        nils = dosum(Tloc(b, 0), b->tnonil, b->hseqbase, &ci, ncand,
                     res, true, b->ttype, tp, &min, min, max,
                     skip_nils, abort_on_error, nil_if_empty, "BATsum", &algo);
-       DEBUG(ALGO, "%s(b="ALGOBATFMT",s="ALGOOPTBATFMT"): %s; "
+       TRC_DEBUG(ALGO, "%s(b="ALGOBATFMT",s="ALGOOPTBATFMT"): %s; "
                                "start " OIDFMT ", count " BUNFMT " (" LLFMT " 
usec)\n",
                                __func__,
                                ALGOBATPAR(b), ALGOOPTBATPAR(s),
diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -138,7 +138,7 @@ VIEWcreate(oid seq, BAT *b)
                GDKfree(bn);
                return NULL;
        }
-       DEBUG(ALGO, "VIEWcreate(" ALGOBATFMT ")=" ALGOBATFMT "\n", 
ALGOBATPAR(b), ALGOBATPAR(bn));
+       TRC_DEBUG(ALGO, "VIEWcreate(" ALGOBATFMT ")=" ALGOBATFMT "\n", 
ALGOBATPAR(b), ALGOBATPAR(bn));
        return bn;
 }
 
@@ -165,7 +165,7 @@ BATmaterialize(BAT *b)
        p = 0;
        q = BUNlast(b);
        assert(cnt >= q - p);
-       DEBUG(ALGO, "BATmaterialize(" ALGOBATFMT ")\n",
+       TRC_DEBUG(ALGO, "BATmaterialize(" ALGOBATFMT ")\n",
                                ALGOBATPAR(b)); 
 
        if (tt != TYPE_void) {
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -212,7 +212,7 @@ COLnew(oid hseq, int tt, BUN cap, role_t
                GDKfree(bn->tvheap);
                goto bailout;
        }
-       DEBUG(ALGO, "COLnew()=" ALGOBATFMT "\n", ALGOBATPAR(bn));
+       TRC_DEBUG(ALGO, "COLnew()=" ALGOBATFMT "\n", ALGOBATPAR(bn));
        return bn;
   bailout:
        BBPclear(bn->batCacheid);
@@ -231,7 +231,7 @@ BATdense(oid hseq, oid tseq, BUN cnt)
        if (bn != NULL) {
                BATtseqbase(bn, tseq);
                BATsetcount(bn, cnt);
-               DEBUG(ALGO, "BATdense()=" ALGOBATFMT "\n", ALGOBATPAR(bn));
+               TRC_DEBUG(ALGO, "BATdense()=" ALGOBATFMT "\n", ALGOBATPAR(bn));
        }
        return bn;
 }
@@ -848,7 +848,7 @@ COLcopy(BAT *b, int tt, bool writable, r
        }
        if (!writable)
                bn->batRestricted = BAT_READ;
-       DEBUG(ALGO, "COLcopy(" ALGOBATFMT ")=" ALGOBATFMT "\n",
+       TRC_DEBUG(ALGO, "COLcopy(" ALGOBATFMT ")=" ALGOBATFMT "\n",
                                ALGOBATPAR(b), ALGOBATPAR(bn));
        return bn;
       bunins_failed:
@@ -1854,12 +1854,12 @@ backup_new(Heap *hp, int lockbat)
                if ((ret = rename(batpath, bakpath)) < 0)
                        GDKsyserror("backup_new: rename %s to %s failed\n",
                                    batpath, bakpath);
-               DEBUG(IO_, "rename(%s,%s) = %d\n", batpath, bakpath, ret);
+               TRC_DEBUG(IO_, "rename(%s,%s) = %d\n", batpath, bakpath, ret);
        } else if (batret == 0) {
                /* there is a backup already; just remove the X.new */
                if ((ret = remove(batpath)) != 0)
                        GDKsyserror("backup_new: remove %s failed\n", batpath);
-               DEBUG(IO_, "remove(%s) = %d\n", batpath, ret);
+               TRC_DEBUG(IO_, "remove(%s) = %d\n", batpath, ret);
        }
        GDKfree(batpath);
        GDKfree(bakpath);
@@ -1967,7 +1967,7 @@ BATsetaccess(BAT *b, restrict_t newmode)
                storage_t b1, b3 = STORE_MEM;
 
                if (b->batSharecnt && newmode != BAT_READ) {
-                       DEBUG(BAT_, "%s has %d views; try creating a copy\n", 
BATgetId(b), b->batSharecnt);
+                       TRC_DEBUG(BAT_, "%s has %d views; try creating a 
copy\n", BATgetId(b), b->batSharecnt);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to