Changeset: 368a21bad415 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=368a21bad415
Modified Files:
        
Branch: default
Log Message:

merged


diffs (truncated from 2109 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -436,3 +436,5 @@
 3dc7b6687e454fc31ce9d3887aa01e457de4e9f2 Mar2011_root
 e4e992bb9279acc293403527538d9909f46f2325 Mar2011_1
 8a1a1b65992cd98423eee70cef0986beb3b7360d Apr2011_root
+e4e992bb9279acc293403527538d9909f46f2325 Mar2011_1
+be8ff3e8c6150ec40f4e0d1ba9789bec23621f88 Mar2011_1
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -574,6 +574,13 @@
 rm -fr $RPM_BUILD_ROOT
 
 %changelog
+* Thu Mar 24 2011 Sjoerd Mullender <[email protected]> - 11.1.1-20110324
+- Rebuilt.
+
+* Tue Mar 22 2011 Fabian Groffen <[email protected]> - 11.1.1-20110324
+- gdk: Fixed memory detection on Darwin (Mac OS X) systems not to return
+  bogus values
+
 * Thu Mar 17 2011 Sjoerd Mullender <[email protected]> - 11.1.1-20110317
 - Rebuilt.
 
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1032,10 +1032,16 @@
                            dnl  did not check the exact version, but 4.1 has 
it, while 3.4.5 does not.
                       esac
                       ;;
-      *-sun-solaris*) CFLAGS="$CFLAGS -O2 -fomit-frame-pointer 
-finline-functions"
+      *-sun-solaris*)
                       if test "$bits" = "64" ; then
                         NO_INLINE_CFLAGS="$NO_INLINE_CFLAGS -O1"
                       fi
+                      case "$gcc_ver" in
+                      4.*)
+                                                 CFLAGS="$CFLAGS -O6 
-fomit-frame-pointer -finline-functions -fexpensive-optimizations 
-funroll-all-loops -funroll-loops -frerun-cse-after-loop -frerun-loop-opt 
-ftree-vectorize";;
+                                         *)
+                                                 CFLAGS="$CFLAGS -O2 
-fomit-frame-pointer -finline-functions";;
+                      esac
                       ;;
       *irix*)         CFLAGS="$CFLAGS -O6 -fomit-frame-pointer 
-finline-functions"
                       ;;
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+monetdb (11.1.1-20110324) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender <[email protected]>  Thu, 24 Mar 2011 09:12:25 +0100
+
+monetdb (11.1.1-20110324) unstable; urgency=low
+
+  * gdk: Fixed memory detection on Darwin (Mac OS X) systems not to return
+    bogus values
+
+ -- Fabian Groffen <[email protected]>  Tue, 22 Mar 2011 09:12:24 +0100
+
 monetdb (11.1.1-20110317) unstable; urgency=low
 
   * Rebuilt.
diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive
--- a/gdk/ChangeLog-Archive
+++ b/gdk/ChangeLog-Archive
@@ -1,6 +1,10 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Tue Mar 22 2011 Fabian Groffen <[email protected]> - 11.1.1-20110324
+- Fixed memory detection on Darwin (Mac OS X) systems not to return
+  bogus values
+
 * Fri Jan 14 2011 Fabian Groffen <[email protected]> - 11.1.1-20110317
 - MonetDB/src/gdk was moved to gdk
 
diff --git a/gdk/ChangeLog.Mar2011 b/gdk/ChangeLog.Mar2011
--- a/gdk/ChangeLog.Mar2011
+++ b/gdk/ChangeLog.Mar2011
@@ -1,7 +1,3 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
-* Tue Mar 22 2011 Fabian Groffen <[email protected]>
-- Fixed memory detection on Darwin (Mac OS X) systems not to return
-  bogus values
-
diff --git a/gdk/gdk_bat.mx b/gdk/gdk_bat.mx
--- a/gdk/gdk_bat.mx
+++ b/gdk/gdk_bat.mx
@@ -1430,6 +1430,13 @@
                                                }
                                        }
                                }
+                               if (b->tkey == TRUE && cmp <= 0) {
+                                       /* cmp==0: definitely not key,
+                                        * cmd<0: we don't know */
+                                       b->T->nokey[0] = i - 1;
+                                       b->T->nokey[1] = i;
+                                       b->tkey = bm->hkey = b->tdense = FALSE;
+                               }
                        } else if (b->tsorted == (bit) GDK_SORTED_REV) {
                                ptr prv = BUNtail(bi, p - 1);
 
@@ -1438,8 +1445,15 @@
                                        b->T->nosorted_rev = i;
                                        b->tsorted = FALSE;
                                }
-                       }
-                       if (b->tkey == TRUE && cmp <= 0) {
+                               if (b->tkey == TRUE && cmp >= 0) {
+                                       /* cmp==0: definitely not key,
+                                        * cmd>0: we don't know */
+                                       b->T->nokey[0] = i - 1;
+                                       b->T->nokey[1] = i;
+                                       b->tkey = bm->hkey = b->tdense = FALSE;
+                               }
+                       } else if (b->tkey == TRUE) {
+                               /* we don't know anything, so unset key */
                                b->T->nokey[0] = i - 1;
                                b->T->nokey[1] = i;
                                b->tkey = bm->hkey = b->tdense = FALSE;
diff --git a/gdk/gdk_setop.mx b/gdk/gdk_setop.mx
--- a/gdk/gdk_setop.mx
+++ b/gdk/gdk_setop.mx
@@ -326,7 +326,7 @@
                        BAT *tmp2 = NULL, *tmp1, *tmp0 = VIEWhead_(b, 
BAT_WRITE);
 
                        if (tmp0) {
-                               tmp1 = BATsample(b, 1000);
+                               tmp1 = BATsample(tmp0, 1000);
                                if (tmp1) {
                                        tmp2 = BATkunique(tmp1);
                                        if (tmp2) {
diff --git a/gdk/gdk_utils.mx b/gdk/gdk_utils.mx
--- a/gdk/gdk_utils.mx
+++ b/gdk/gdk_utils.mx
@@ -463,17 +463,17 @@
                _MT_pagesize = sysInfo.dwPageSize;
        }
 #else
-# if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
-       _MT_pagesize = sysconf(_SC_PAGESIZE);
-# else
-#  if defined(HAVE_SYS_SYSCTL_H) && defined(HW_PAGESIZE)
+# if defined(HAVE_SYS_SYSCTL_H) && defined(HW_PAGESIZE)
        {
-               int size;
+               int size = 0;
                size_t len = sizeof(size);
 
                sysctlbyname("hw.pagesize", &size, &len, NULL, 0);
                _MT_pagesize = size;
        }
+# else
+#  if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
+       _MT_pagesize = sysconf(_SC_PAGESIZE);
 #  endif
 # endif
 #endif
@@ -497,17 +497,17 @@
                _MT_npages = memStat.dwTotalPhys / _MT_pagesize;
        }
 # else
-#  if defined(HAVE_SYSCONF) && defined(_SC_PHYS_PAGES)
-       _MT_npages = sysconf(_SC_PHYS_PAGES);
-#  else
-#   if defined(HAVE_SYS_SYSCTL_H) && defined(HW_MEMSIZE)
+#  if defined(HAVE_SYS_SYSCTL_H) && defined(HW_MEMSIZE)
        {
-               uint64_t size;
+               uint64_t size = 0;
                size_t len = sizeof(size);
 
                sysctlbyname("hw.memsize", &size, &len, NULL, 0);
                _MT_npages = size / _MT_pagesize;
        }
+#  else
+#   if defined(HAVE_SYSCONF) && defined(_SC_PHYS_PAGES)
+       _MT_npages = sysconf(_SC_PHYS_PAGES);
 #   else
 #    error "don't know how to get the amount of physical memory for your OS"
 #   endif /* sysctl */
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -1429,7 +1429,7 @@
                                oa = getArg(p,j);
                                /* find the last instruction that should be 
inspected for eligibility */
                                if ( getEndOfLife(flow->mb,oa) > lookahead)
-                                       lookahead = getEndOfLife(flow->mb,oa);
+                                       lookahead = getEndOfLife(flow->mb,oa) 
+1;
 
                                flow->blocked[oa] = 0;
                                flow->inuse[oa] = 0;
@@ -1450,9 +1450,9 @@
                        lookahead = limit;
 
                if (flow->stk->admit == 0) {
-                       @:DFLOWscheduler_body( DFLOWeligible(flow,fs,i,p,pc) )@
+                       @:DFLOWscheduler_body( DFLOWeligible(flow,fs,i,p,pc), 
foundit1 )@
                } else {
-                       @:DFLOWscheduler_body( DFLOWeligible(flow,fs,i,p,pc) && 
(*flow->stk->admit)(flow->cntxt, flow->mb, flow->stk, p) )@
+                       @:DFLOWscheduler_body( DFLOWeligible(flow,fs,i,p,pc) && 
(*flow->stk->admit)(flow->cntxt, flow->mb, flow->stk, p), foundit2 )@
                }
 @= DFLOWscheduler_body
                /* first try to find an instructions that use the released 
target */
@@ -1471,8 +1471,9 @@
                                                        
DFLOWactivate(flow,fs,i,p);
                                                        q_enqueue(flow->todo, 
fs+i);
                                                }
-                                               break;
+                                               goto @2;
                                        }
+                               @2: /* it can only be activated once */;
                        }
                /* if all work done then inspect rest */
                if (candidates < flow->nway)
diff --git a/monetdb5/modules/kernel/bat5.mx b/monetdb5/modules/kernel/bat5.mx
--- a/monetdb5/modules/kernel/bat5.mx
+++ b/monetdb5/modules/kernel/bat5.mx
@@ -3881,13 +3881,29 @@
        case TYPE_dbl: @:shrinkloop(dbl)@ break;
        case TYPE_oid: @:shrinkloop(oid)@ break;
        default:
-               switch( b->T->width){
-               case 1:@:shrinkloop(bte)@ break;
-               case 2:@:shrinkloop(sht)@ break;
-               case 4:@:shrinkloop(int)@ break;
-               case 8:@:shrinkloop(lng)@ break;
-               default:
-                       throw(MAL, "bat.shrink", "Illegal argument type");
+               if (ATOMvarsized(bn->ttype)) {
+                       BUN p = BUNfirst(b);
+                       BUN q = BUNlast(b);
+                       BATiter bi = bat_iterator(b);
+
+                       cnt=0;
+                       for (;p<q; oidx++, p++) {
+                               if ( o < ol && *o == oidx ){
+                                       o++;
+                               } else {
+                                       BUNappend(bn, BUNtail(bi, p), FALSE);
+                                       cnt++;
+                               }
+                       }
+               } else {
+                       switch( b->T->width){
+                       case 1:@:shrinkloop(bte)@ break;
+                       case 2:@:shrinkloop(sht)@ break;
+                       case 4:@:shrinkloop(int)@ break;
+                       case 8:@:shrinkloop(lng)@ break;
+                       default:
+                               throw(MAL, "bat.shrink", "Illegal argument 
type");
+                       }
                }
        }
        BATaccessEnd(d, USE_TAIL, MMAP_SEQUENTIAL);
@@ -4044,13 +4060,32 @@
        case TYPE_oid: @:reuseloop(oid)@ break;
        case TYPE_str: /* to be done based on its index width */
        default:
-               switch( b->T->width){
-               case 1:@:reuseloop(bte)@ break;
-               case 2:@:reuseloop(sht)@ break;
-               case 4:@:reuseloop(int)@ break;
-               case 8:@:reuseloop(lng)@ break;
-               default:
-                       throw(MAL, "bat.shrink", "Illegal argument type");
+               if (ATOMvarsized(bn->ttype)) {
+                       BUN p = BUNfirst(b);
+                       BUN q = BUNlast(b);
+                       BATiter bi = bat_iterator(b);
+               
+                       for (;p<q; oidx++, p++) {
+                               if ( *o == oidx ){
+                                       while ( *ol == bidx && ol>o) {
+                                               bidx--;
+                                               ol--;q--;
+                                       }
+                                       BUNappend(bn, BUNtail(bi, --q), FALSE);
+                                       o += (o < ol);
+                                       bidx--;
+                               } else
+                                       BUNappend(bn, BUNtail(bi, p), FALSE);
+                       }
+               } else {
+                       switch( b->T->width){
+                       case 1:@:reuseloop(bte)@ break;
+                       case 2:@:reuseloop(sht)@ break;
+                       case 4:@:reuseloop(int)@ break;
+                       case 8:@:reuseloop(lng)@ break;
+                       default:
+                               throw(MAL, "bat.shrink", "Illegal argument 
type");
+                       }
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to