Changeset: ce94bab4ad9b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ce94bab4ad9b
Modified Files:
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_private.h
gdk/gdk_utils.c
Branch: default
Log Message:
Merge with Mar2025 branch.
diffs (truncated from 706 to 300 lines):
diff --git a/README.rst b/README.rst
--- a/README.rst
+++ b/README.rst
@@ -100,7 +100,7 @@ On Fedora, the following packages are re
``bison``, ``cmake``, ``gcc``, ``pkgconf``, ``python3``.
The following packages are optional but recommended:
-``bzip2-devel``, ``lz4-devel``, ``openssl-devel``, ``pcre-devel``,
+``bzip2-devel``, ``lz4-devel``, ``openssl-devel``, ``pcre2-devel``,
``readline-devel``, ``xz-devel``, ``zlib-devel``.
The following packages are optional:
@@ -113,7 +113,7 @@ On Ubuntu and Debian the following packa
``bison``, ``cmake``, ``gcc``, ``pkg-config``, ``python3``.
The following packages are optional but recommended:
-``libbz2-dev``, ``liblz4-dev``, ``libpcre3-dev``, ``libreadline-dev``,
+``libbz2-dev``, ``liblz4-dev``, ``libpcre2-dev``, ``libreadline-dev``,
``liblzma-dev``, ``libssl-dev``, ``zlib1g-dev``.
The following packages are optional:
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2505,19 +2505,20 @@ doFile(Mapi mid, stream *fp, bool useins
}
} else {
if (tname == NULL)
- tname = p;
+ tname = q;
if (!escaped) {
- *q++ =
tolower((int) *p);
if (*p == '*') {
- *p =
'%';
+ *q++ =
'%';
hasWildcard = true;
} else if (*p
== '?') {
- *p =
'_';
+ *q++ =
'_';
hasWildcard = true;
} else if (*p
== '.') {
- *p =
'\0';
+ *q++ =
'\0';
sname =
tname;
tname =
NULL;
+ } else {
+ *q++ =
tolower((unsigned char) *p);
}
} else {
*q++ = *p;
diff --git a/documentation/source/build-debian.rst
b/documentation/source/build-debian.rst
--- a/documentation/source/build-debian.rst
+++ b/documentation/source/build-debian.rst
@@ -30,7 +30,7 @@ libbz2-dev # optional: read and write .
libcurl4-gnutls-dev # optional: read remote files with sys.getcontent(url)
libgeos-dev # optional: required for geom module
liblzma-dev # optional: read and write .xz compressed files
-libpcre3-dev # optional: use PCRE library, enable some functions
+libpcre2-dev # optional: use PCRE2 library, enable some functions
libreadline-dev # optional, enable editing in mclient
python3-dev # optional, needed for Python 3 integration
python3-numpy # optional, needed for Python 3 integration
diff --git a/documentation/source/build-fedora.rst
b/documentation/source/build-fedora.rst
--- a/documentation/source/build-fedora.rst
+++ b/documentation/source/build-fedora.rst
@@ -30,7 +30,7 @@ the command make rpm.
| checkpolicy # optional, required to create RPMs (make rpm)
| geos-devel # optional: required for geom module
| libcurl-devel # optional: read remote files with
sys.getcontent(url)
-| pcre-devel # optional: use PCRE library, enable some functions
+| pcre2-devel # optional: use PCRE2 library, enable some functions
| python3-devel # optional, needed for Python 3 integration
| python3-numpy # optional, needed for Python 3 integration
| R-core-devel # optional, needed for R integration
diff --git a/documentation/source/build.rst b/documentation/source/build.rst
--- a/documentation/source/build.rst
+++ b/documentation/source/build.rst
@@ -114,7 +114,7 @@ Start cmd.exe in "Run as administrator"
vcpkg integrate install
# needed for 64 bits (with the available python being 64 bit this is needed)
set VCPKG_DEFAULT_TRIPLET=x64-windows
- vcpkg install libiconv bzip2 geos libxml2 pcre pcre2 zlib getopt openssl
+ vcpkg install libiconv bzip2 geos libxml2 pcre2 zlib getopt openssl
To compile MonetDB (as normal user)::
@@ -143,7 +143,7 @@ Using homebrew install at least current
mercurial
cmake
pkg-config
- pcre
+ pcre2
bison
optional::
diff --git a/gdk/ChangeLog.Mar2025 b/gdk/ChangeLog.Mar2025
--- a/gdk/ChangeLog.Mar2025
+++ b/gdk/ChangeLog.Mar2025
@@ -1,3 +1,7 @@
# ChangeLog file for GDK
# This file is updated with Maddlog
+* Tue Aug 5 2025 Sjoerd Mullender <[email protected]>
+- The SIGUSR1 output now displays counts for memory sizes in a
+ human-readable format next to the original byte counts.
+
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1323,6 +1323,11 @@ BATappend_or_update(BAT *b, BAT *p, cons
bool locked = false;
if (b->tvheap) {
+ const void *prevnew = NULL;
+ var_t prevoff = 0;
+ const bool hasdel = BATatoms[b->ttype].atomDel != NULL;
+ bool minupdated = false;
+ bool maxupdated = false;
for (BUN i = 0; i < ni.count; i++) {
oid updid;
if (positions) {
@@ -1399,13 +1404,22 @@ BATappend_or_update(BAT *b, BAT *p, cons
b->tnil |= isnil;
MT_lock_unset(&b->theaplock);
if (bi.maxpos != BUN_NONE) {
+ /* if new value is the same as the
+ * previous new value, we've already
+ * dealt with it; if we've already
+ * updated the maxpos, it cannot be the
+ * same as the old value, so we can skip
+ * that check */
if (!isnil &&
+ (prevnew == NULL || prevnew != new) &&
atomcmp(BUNtvar(bi, bi.maxpos), new) < 0) {
/* new value is larger than
* previous largest */
bi.maxpos = updid;
+ maxupdated = true;
} else if (old == NULL ||
- (atomcmp(BUNtvar(bi, bi.maxpos),
old) == 0 &&
+ (!maxupdated &&
+ atomcmp(BUNtvar(bi, bi.maxpos),
old) == 0 &&
atomcmp(new, old) != 0)) {
/* old value is equal to
* largest and new value is
@@ -1417,12 +1431,15 @@ BATappend_or_update(BAT *b, BAT *p, cons
}
if (bi.minpos != BUN_NONE) {
if (!isnil &&
+ (prevnew == NULL || prevnew != new) &&
atomcmp(BUNtvar(bi, bi.minpos), new) > 0) {
/* new value is smaller than
* previous smallest */
bi.minpos = updid;
+ minupdated = true;
} else if (old == NULL ||
- (atomcmp(BUNtvar(bi, bi.minpos),
old) == 0 &&
+ (!minupdated &&
+ atomcmp(BUNtvar(bi, bi.minpos),
old) == 0 &&
atomcmp(new, old) != 0)) {
/* old value is equal to
* smallest and new value is
@@ -1463,7 +1480,16 @@ BATappend_or_update(BAT *b, BAT *p, cons
MT_UNREACHABLE();
}
MT_lock_set(&b->theaplock);
- gdk_return rc = ATOMreplaceVAR(b, &d, new);
+ gdk_return rc = GDK_SUCCEED;
+ bool skip = false;
+ if (new == prevnew && !hasdel) {
+ d = prevoff;
+ skip = true;
+ } else {
+ rc = ATOMreplaceVAR(b, &d, new);
+ prevnew = new;
+ prevoff = d;
+ }
MT_lock_unset(&b->theaplock);
if (rc != GDK_SUCCEED) {
goto bailout;
@@ -1478,7 +1504,7 @@ BATappend_or_update(BAT *b, BAT *p, cons
/* in case ATOMreplaceVAR and/or
* GDKupgradevarheap replaces a heap, we need to
* reinitialize the iterator */
- {
+ if (!skip) {
/* save and restore minpos/maxpos */
BUN minpos = bi.minpos;
BUN maxpos = bi.maxpos;
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -4713,70 +4713,231 @@ BBPprintinfo(void)
}
BBPtmunlock();
printf("BATs:\n");
+ char mbuf[24], vbuf[24];
if (bats[1][1][1][1][1].nr > 0)
- printf("fix, dirty, persistent, loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][1][1][1].nr, bats[1][1][1][1][1].vmsz,
bats[1][1][1][1][1].sz);
+ printf("fix, dirty, persistent, loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][1][1][1].nr,
+ bats[1][1][1][1][1].vmsz,
+ humansize(bats[1][1][1][1][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][1][1][1].sz,
+ humansize(bats[1][1][1][1][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][1][1][0].nr > 0)
- printf("fix, dirty, persistent, not loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][1][1][0].nr, bats[1][1][1][1][0].vmsz,
bats[1][1][1][1][0].sz);
+ printf("fix, dirty, persistent, not loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][1][1][0].nr,
+ bats[1][1][1][1][0].vmsz,
+ humansize(bats[1][1][1][1][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][1][1][0].sz,
+ humansize(bats[1][1][1][1][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][1][0][1].nr > 0)
- printf("fix, dirty, persistent, loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][1][0][1].nr, bats[1][1][1][0][1].vmsz,
bats[1][1][1][0][1].sz);
+ printf("fix, dirty, persistent, loaded, cold: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][1][0][1].nr,
+ bats[1][1][1][0][1].vmsz,
+ humansize(bats[1][1][1][0][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][1][0][1].sz,
+ humansize(bats[1][1][1][0][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][1][0][0].nr > 0)
- printf("fix, dirty, persistent, not loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][1][0][0].nr, bats[1][1][1][0][0].vmsz,
bats[1][1][1][0][0].sz);
+ printf("fix, dirty, persistent, not loaded, cold: %d bats,
%zu%s virtual, %zu%s malloc\n",
+ bats[1][1][1][0][0].nr,
+ bats[1][1][1][0][0].vmsz,
+ humansize(bats[1][1][1][0][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][1][0][0].sz,
+ humansize(bats[1][1][1][0][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][0][1][1].nr > 0)
- printf("fix, dirty, transient, loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][0][1][1].nr, bats[1][1][0][1][1].vmsz,
bats[1][1][0][1][1].sz);
+ printf("fix, dirty, transient, loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][0][1][1].nr,
+ bats[1][1][0][1][1].vmsz,
+ humansize(bats[1][1][0][1][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][0][1][1].sz,
+ humansize(bats[1][1][0][1][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][0][1][0].nr > 0)
- printf("fix, dirty, transient, not loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][0][1][0].nr, bats[1][1][0][1][0].vmsz,
bats[1][1][0][1][0].sz);
+ printf("fix, dirty, transient, not loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][0][1][0].nr,
+ bats[1][1][0][1][0].vmsz,
+ humansize(bats[1][1][0][1][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][0][1][0].sz,
+ humansize(bats[1][1][0][1][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][0][0][1].nr > 0)
- printf("fix, dirty, transient, loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][0][0][1].nr, bats[1][1][0][0][1].vmsz,
bats[1][1][0][0][1].sz);
+ printf("fix, dirty, transient, loaded, cold: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][0][0][1].nr,
+ bats[1][1][0][0][1].vmsz,
+ humansize(bats[1][1][0][0][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][0][0][1].sz,
+ humansize(bats[1][1][0][0][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][1][0][0][0].nr > 0)
- printf("fix, dirty, transient, not loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][1][0][0][0].nr, bats[1][1][0][0][0].vmsz,
bats[1][1][0][0][0].sz);
+ printf("fix, dirty, transient, not loaded, cold: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][1][0][0][0].nr,
+ bats[1][1][0][0][0].vmsz,
+ humansize(bats[1][1][0][0][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][1][0][0][0].sz,
+ humansize(bats[1][1][0][0][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][0][1][1][1].nr > 0)
- printf("fix, clean, persistent, loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][0][1][1][1].nr, bats[1][0][1][1][1].vmsz,
bats[1][0][1][1][1].sz);
+ printf("fix, clean, persistent, loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][0][1][1][1].nr,
+ bats[1][0][1][1][1].vmsz,
+ humansize(bats[1][0][1][1][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][0][1][1][1].sz,
+ humansize(bats[1][0][1][1][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][0][1][1][0].nr > 0)
- printf("fix, clean, persistent, not loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][0][1][1][0].nr, bats[1][0][1][1][0].vmsz,
bats[1][0][1][1][0].sz);
+ printf("fix, clean, persistent, not loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][0][1][1][0].nr,
+ bats[1][0][1][1][0].vmsz,
+ humansize(bats[1][0][1][1][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][0][1][1][0].sz,
+ humansize(bats[1][0][1][1][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][0][1][0][1].nr > 0)
- printf("fix, clean, persistent, loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][0][1][0][1].nr, bats[1][0][1][0][1].vmsz,
bats[1][0][1][0][1].sz);
+ printf("fix, clean, persistent, loaded, cold: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][0][1][0][1].nr,
+ bats[1][0][1][0][1].vmsz,
+ humansize(bats[1][0][1][0][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][0][1][0][1].sz,
+ humansize(bats[1][0][1][0][1].sz, mbuf, sizeof(mbuf)));
if (bats[1][0][1][0][0].nr > 0)
- printf("fix, clean, persistent, not loaded, cold: %d bats, %zu
virtual, %zu malloc\n", bats[1][0][1][0][0].nr, bats[1][0][1][0][0].vmsz,
bats[1][0][1][0][0].sz);
+ printf("fix, clean, persistent, not loaded, cold: %d bats,
%zu%s virtual, %zu%s malloc\n",
+ bats[1][0][1][0][0].nr,
+ bats[1][0][1][0][0].vmsz,
+ humansize(bats[1][0][1][0][0].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][0][1][0][0].sz,
+ humansize(bats[1][0][1][0][0].sz, mbuf, sizeof(mbuf)));
if (bats[1][0][0][1][1].nr > 0)
- printf("fix, clean, transient, loaded, hot: %d bats, %zu
virtual, %zu malloc\n", bats[1][0][0][1][1].nr, bats[1][0][0][1][1].vmsz,
bats[1][0][0][1][1].sz);
+ printf("fix, clean, transient, loaded, hot: %d bats, %zu%s
virtual, %zu%s malloc\n",
+ bats[1][0][0][1][1].nr,
+ bats[1][0][0][1][1].vmsz,
+ humansize(bats[1][0][0][1][1].vmsz, vbuf, sizeof(vbuf)),
+ bats[1][0][0][1][1].sz,
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]