Changeset: feb8b421694b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=feb8b421694b
Modified Files:
        monetdb5/modules/kernel/status.c
        monetdb5/modules/kernel/status.h
Branch: headless
Log Message:

Solving compiling issues


diffs (truncated from 508 to 300 lines):

diff --git a/monetdb5/modules/kernel/status.c b/monetdb5/modules/kernel/status.c
--- a/monetdb5/modules/kernel/status.c
+++ b/monetdb5/modules/kernel/status.c
@@ -21,12 +21,12 @@
  * System state information 
  * This document introduces a series of bats  and operations that provide 
access
  * to information stored within the Monet Version 5 internal data structures.
- * In all cases, pseudo BAT operation returns a transient BAT that
+ * In all cases, pseudo column operation returns a transient column that
  * should be garbage collected after being used.
  * 
- * The main performance drain would be to use a pseudo BAT directly to
+ * The main performance drain would be to use a pseudo column directly to
  * successively access it components. This can be avoided by first assigning
- * the pseudo BAT to a variable.
+ * the pseudo column to a variable.
 */
 
 #include "monetdb_config.h"
@@ -122,7 +122,7 @@
 #endif
 
 str
-SYScpuStatistics(int *ret, int *ret2)
+SYScpuStatistics(int *ret, int *ret1)
 {
        int i;
        COL *b, *bs;
@@ -141,8 +141,8 @@
 # endif
 #endif
 
-       b  = BATnew(TYPE_str, 32);
-       bs = BATnew(TYPE_int, 32);
+       b  = COLnew(TYPE_str, 32);
+       bs = COLnew(TYPE_int, 32);
        if (b == 0 || bs == 0)
                throw(MAL, "status.cpuStatistics", MAL_MALLOC_FAIL);
 #ifdef HAVE_TIMES
@@ -154,35 +154,35 @@
        /* store counters, ignore errors */
        i = (int) (time(0) - clk);
        b = BUNappend(b, "elapsed", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        i = newst.tms_utime * 1000 / HZ;
        b = BUNappend(b, "user", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        i = (newst.tms_utime - state.tms_utime) * 1000 / HZ;
        b = BUNappend(b, "elapuser", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        i = newst.tms_stime * 1000 / HZ;
        b = BUNappend(b, "system", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        i = (newst.tms_stime - state.tms_stime) * 1000 / HZ;
        b = BUNappend(b, "elapsystem", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
 
        state = newst;
 #else
        i = int_nil;
        b = BUNappend(b, "elapsed", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        b = BUNappend(b, "user", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        b = BUNappend(b, "elapuser", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        b = BUNappend(b, "system", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
        b = BUNappend(b, "elapsystem", FALSE);
-       bs = BUNappend(b, &i, FALSE);
+       bs = BUNappend(bs, &i, FALSE);
 #endif
-       if (!(b->dirty&2)) b = COLsetaccess(b, BAT_READ);
+       if (!(b->dirty&2)) b = COLsetaccess(b, COL_READ);
        *ret = CBPkeepref(b);
        *ret1 = CBPkeepref(bs);
        return MAL_SUCCEED;
@@ -193,13 +193,13 @@
 SYSmemStatistics(int *ret)
 {
        struct Mallinfo m;
-       COL *b, *mb;
+       COL *b, *bm;
        wrd i;
 
        m = MT_mallinfo();
 
-       b = BATnew(TYPE_str, 32);
-       bm = BATnew(TYPE_wrd, 32);
+       b = COLnew(TYPE_str, 32);
+       bm = COLnew(TYPE_wrd, 32);
        if (b == 0 || bm == 0)
                throw(MAL, "status.memStatistics", MAL_MALLOC_FAIL);
 
@@ -211,35 +211,35 @@
 
        memincr = MT_heapcur();
        b = BUNappend(b, "memincr", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.arena;
        b = BUNappend(b, "arena", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.ordblks;
        b = BUNappend(b, "ordblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.smblks;
        b = BUNappend(b, "smblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.hblkhd;
        b = BUNappend(b, "hblkhd", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.hblks;
        b = BUNappend(b, "hblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.usmblks;
        b = BUNappend(b, "usmblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.fsmblks;
        b = BUNappend(b, "fsmblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.uordblks;
        b = BUNappend(b, "uordblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
+       bm = BUNappend(bm, &i, FALSE);
        i = (wrd) m.fordblks;
        b = BUNappend(b, "fordblks", FALSE);
-       bm = BUNappend(b, &i, FALSE);
-       if (!(b->dirty&2)) b = COLsetaccess(b, BAT_READ);
+       bm = BUNappend(bm, &i, FALSE);
+       if (!(b->dirty&2)) b = COLsetaccess(b, COL_READ);
        *ret = CBPkeepref(b);
        return MAL_SUCCEED;
 }
@@ -249,7 +249,8 @@
                sz = HEAPmemsize(A3); \
                if (sz > *minsize) { \
                        sprintf(buf, "mem/%s", s); \
-                       BUNappend(bn, buf, &sz, FALSE); \
+                       bs = BUNappend(bn, buf, FALSE); \
+                       bn = BUNappend(bn, &sz, FALSE); \
                } \
                A4 += sz; tot += sz; \
        }
@@ -257,7 +258,7 @@
 str
 SYSmem_usage(int *ret, int *ret1, lng *minsize)
 {
-       lng hbuns = 0, tbuns = 0, hhsh = 0, thsh = 0, hind = 0, tind = 0, head 
= 0, tail = 0, tot = 0, n = 0, sz;
+       lng hbuns = 0, hhsh = 0, hind = 0, head = 0, tot = 0, n = 0, sz;
        COL *bs = COLnew(TYPE_str, 2 * CBPsize);
        COL *bn = COLnew(TYPE_lng, 2 * CBPsize);
        struct Mallinfo m;
@@ -277,75 +278,74 @@
                s = CBPname(i);
                sz = 0;
                if (CBP[i].cache)
-                       sz += sizeof(BATstore);
-               if (CBP[i].nme[0])
-                       n += strLen(CBP[i].nme[0]);
-               if (CBP[i].nme[1])
-                       n += strLen(CBP[i].nme[1]);
+                       sz += sizeof(COL); 
+                       if (CBP[i].nme)
+                               n += strlen(CBP[i].nme);
                if (CBP[i].path)
-                       n += strLen(CBP[i].path);
+                       n += strlen(CBP[i].path);
 
                if (sz > *minsize) {
                        sprintf(buf, "desc/%s", s);
-                       BUNappend(bn, buf, &sz, FALSE);
+                       bs = BUNappend(bn, buf, FALSE);
+                       bn = BUNappend(bn, &sz, FALSE);
                }
                tot += (lng) sz;
 
                if (b == NULL || isVIEW(b)) 
                        continue;
                
-               memheap(1,&b->heap,buns);
-               memheap(b->hash,b->hash->heap,hsh);
+               memheap(1,&b->heap,hbuns);
+               memheap(b->hash,b->hash->heap,hhsh);
                memheap(b->vheap,b->vheap,head);
                CBPreleaseref(b);
        }
        /* totals per category */
-       BUNappend(bs, "_tot/buns", FALSE);
-       BUNappend(bn, &hbuns, FALSE);
-       BUNappend(bs, "_tot/head", FALSE);
-       BUNappend(bn, &head, FALSE);
-       BUNappend(bs, "_tot/hsh", FALSE);
-       BUNappend(bn, &hhsh, FALSE);
-       BUNappend(bs, "_tot/ind", FALSE);
-       BUNappend(bn, &hind, FALSE);
+       bs = BUNappend(bs, "_tot/buns", FALSE);
+       bn = BUNappend(bn, &hbuns, FALSE);
+       bs = BUNappend(bs, "_tot/head", FALSE);
+       bn = BUNappend(bn, &head, FALSE);
+       bs = BUNappend(bs, "_tot/hsh", FALSE);
+       bn = BUNappend(bn, &hhsh, FALSE);
+       bs = BUNappend(bs, "_tot/ind", FALSE);
+       bn = BUNappend(bn, &hind, FALSE);
 
        /* special area 1: CBP rec */
        sz = CBPlimit * sizeof(CBPrec) + n;
-       BUNappend(bs, "_tot/bbp", FALSE);
-       BUNappend(bn, &sz, FALSE);
+       bs = BUNappend(bs, "_tot/bbp", FALSE);
+       bn = BUNappend(bn, &sz, FALSE);
        tot += sz;
 
        /* this concludes all major traceable Monet memory usages */
        tot += sz;
-       BUNappend(bs, "_tot/found", FALSE);
-       BUNappend(bn, &tot, FALSE);
+       bs = BUNappend(bs, "_tot/found", FALSE);
+       bn = BUNappend(bn, &tot, FALSE);
 
        /* now look at what the global statistics report (to see if it 
coincides) */
 
        /* how much *used* bytes in heap? */
        m = MT_mallinfo();
        sz = (size_t) m.usmblks + (size_t) m.uordblks + (size_t) m.hblkhd;
-       BUNappend(bs, "_tot/malloc", FALSE);
-       BUNappend(bn, &sz, FALSE);
+       bs = BUNappend(bs, "_tot/malloc", FALSE);
+       bn = BUNappend(bn, &sz, FALSE);
 
        /* measure actual heap size, includes wasted fragmented space and anon 
mmap space used by malloc() */
        sz = GDKvm_heapsize();
-       BUNappend(bs, "_tot/heap", FALSE);
-       BUNappend(bn, &sz, FALSE);
+       bs = BUNappend(bs, "_tot/heap", FALSE);
+       bn = BUNappend(bn, &sz, FALSE);
 
        tot = GDKmem_cursize();
 
        /* allocated swap area memory that is not plain malloc() */
        sz = MAX(0, sz - tot);
-       BUNappend(bs, "_tot/valloc", FALSE);
-       BUNappend(bn, &sz, FALSE);
+       bs = BUNappend(bs, "_tot/valloc", FALSE);
+       bn = BUNappend(bn, &sz, FALSE);
 
        /* swap-area memory is in either GDKvmalloc or heap */
-       BUNappend(bs, "_tot/swapmem", FALSE);
-       BUNappend(bn, &tot, FALSE);
+       bs = BUNappend(bs, "_tot/swapmem", FALSE);
+       bn = BUNappend(bn, &tot, FALSE);
 
        CBPunlock("SYSmem_usage");
-       if (!(bn->dirty&2)) bn = COLsetaccess(bn, BAT_READ);
+       if (!(bn->dirty&2)) bn = COLsetaccess(bn, COL_READ);
        *ret = CBPkeepref(bs);
        *ret1 = CBPkeepref(bn);
        return MAL_SUCCEED;
@@ -356,7 +356,8 @@
                sz = HEAPvmsize(A3); \
                if (sz > *minsize) { \
                        sprintf(buf, "vm/%s", s); \
-                       BUNappend(bn, buf, &sz, FALSE); \
+                       bs = BUNappend(bs, buf, FALSE); \
+                       bn = BUNappend(bn, &sz, FALSE); \
                } \
                A4 += sz; tot += sz; \
        }
@@ -364,9 +365,9 @@
 str
 SYSvm_usage(int *ret, int *ret1, lng *minsize)
 {
-       lng hbuns = 0, tbuns = 0, hhsh = 0, thsh = 0, hind = 0, tind = 0, head 
= 0, tail = 0, tot = 0, sz;
-       COL *bs = BATnew(TYPE_str, 2 * CBPsize);
-       COL *bn = BATnew(TYPE_lng, 2 * CBPsize);
+       lng hbuns = 0, hhsh = 0, hind = 0, head = 0, tot = 0, sz;
+       COL *bs = COLnew(TYPE_str, 2 * CBPsize);
+       COL *bn = COLnew(TYPE_lng, 2 * CBPsize);
        char buf[1024];
        bat i;
 
@@ -385,42 +386,42 @@
                if (b == NULL || isVIEW(b)) {
                        continue;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to