Changeset: 48a94c9f62b2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/48a94c9f62b2 Modified Files: sql/backends/monet5/rel_physical.c sql/backends/monet5/rel_pphash.c Branch: manti Log Message:
merged from default diffs (truncated from 2165 to 300 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Thu Sep 17 2026 Sjoerd Mullender <[email protected]> +- It is now possible to use --set usr1_outputfile=... to specify a file + where the output for the SIGUSR1 signal is to be written. The file + is opened (created if it doesn't exist, appended to if it does) every + time output is generated, making it easy to rotate the file. + * Mon Aug 3 2026 Sjoerd Mullender <[email protected]> - The hash function used for all internal hash tables has been changed to xxhash which is therefore now a build requirement. diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -306,7 +306,7 @@ ATOMIC_TYPE GDKlockcontentioncnt; MT_Lock *volatile GDKlocklist; ATOMIC_FLAG GDKlocklistlock; ATOMIC_TYPE GDKlocksleepcnt; -void GDKlockstatistics(int); +void GDKlockstatistics(FILE *outf, int); void *GDKmalloc(size_t size); size_t GDKmem_cursize(void); gdk_return GDKmergeidx(BAT *b, BAT **a, int n_ar); @@ -316,7 +316,7 @@ gdk_return GDKmunmap(void *addr, int mod int GDKnr_threads; void GDKprepareExit(void); void GDKprintinfo(void); -void GDKprintinforegister(void (*func)(void)); +void GDKprintinforegister(void (*func)(FILE *)); void GDKqsort(void *restrict h, void *restrict t, const void *restrict base, size_t n, int hs, int ts, int tpe, bool reverse, bool nilslast); void *GDKrealloc(void *pold, size_t size); gdk_return GDKrebuild_segment_tree(oid ncount, oid data_size, Heap *st, void **segment_tree, oid **levels_offset, oid *nlevels); @@ -559,7 +559,7 @@ gdk_return log_delta(logger *lg, BAT *ui void log_destroy(logger *lg); log_bid log_find_bat(logger *lg, log_id id); gdk_return log_flush(logger *lg, ulng saved_id); -void log_printinfo(logger *lg); +void log_printinfo(FILE *outf, logger *lg); int log_sequence(logger *lg, int seq, lng *id); gdk_return log_tend(logger *lg); gdk_return log_tflush(logger *lg, ulng log_file_id, ulng commit_ts); diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -919,7 +919,7 @@ gdk_export void MT_tls_set(MT_TLS_t key, gdk_export void *MT_tls_get(MT_TLS_t key); #ifdef LOCK_STATS -gdk_export void GDKlockstatistics(int); +gdk_export void GDKlockstatistics(FILE *outf, int); gdk_export MT_Lock * volatile GDKlocklist; gdk_export ATOMIC_FLAG GDKlocklistlock; gdk_export ATOMIC_TYPE GDKlockcnt; @@ -1119,7 +1119,8 @@ gdk_export void MT_cond_broadcast(MT_Con gdk_export size_t MT_getrss(void); -gdk_export bool MT_path_absolute(const char *path); +gdk_export bool MT_path_absolute(const char *path) + __attribute__((__nonnull__(1))); /* @@ -3792,7 +3793,7 @@ gdk_export gdk_return BBPdir_last(int n, gdk_export BUN GDKL3_size; -gdk_export void GDKprintinforegister(void (*func)(void)); +gdk_export void GDKprintinforegister(void (*func)(FILE *)); gdk_export void GDKprintinfo(void); gdk_export const char *GDKgetenv(const char *name); diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -2357,6 +2357,8 @@ BATgroupavg3(BAT **avgp, BAT **remp, BAT o = canditer_next(&ci) - b->hseqbase; if (ngrp > 1) gid = (gids ? gids[o] : g->tseqbase + o) - min; + if (inout && cnts[gid] == 0) + avgs[gid] = 0; if (is_bte_nil(vals[o])) { if (!skip_nils) { avgs[gid] = bte_nil; @@ -2405,6 +2407,8 @@ BATgroupavg3(BAT **avgp, BAT **remp, BAT o = canditer_next(&ci) - b->hseqbase; if (ngrp > 1) gid = (gids ? gids[o] : g->tseqbase + o) - min; + if (inout && cnts[gid] == 0) + avgs[gid] = 0; if (is_sht_nil(vals[o])) { if (!skip_nils) { avgs[gid] = sht_nil; @@ -2453,6 +2457,8 @@ BATgroupavg3(BAT **avgp, BAT **remp, BAT o = canditer_next(&ci) - b->hseqbase; if (ngrp > 1) gid = (gids ? gids[o] : g->tseqbase + o) - min; + if (inout && cnts[gid] == 0) + avgs[gid] = 0; if (is_int_nil(vals[o])) { if (!skip_nils) { avgs[gid] = int_nil; @@ -2501,6 +2507,8 @@ BATgroupavg3(BAT **avgp, BAT **remp, BAT o = canditer_next(&ci) - b->hseqbase; if (ngrp > 1) gid = (gids ? gids[o] : g->tseqbase + o) - min; + if (inout && cnts[gid] == 0) + avgs[gid] = 0; if (is_lng_nil(vals[o])) { if (!skip_nils) { avgs[gid] = lng_nil; @@ -2550,6 +2558,8 @@ BATgroupavg3(BAT **avgp, BAT **remp, BAT o = canditer_next(&ci) - b->hseqbase; if (ngrp > 1) gid = (gids ? gids[o] : g->tseqbase + o) - min; + if (inout && cnts[gid] == 0) + avgs[gid] = 0; if (is_hge_nil(vals[o])) { if (!skip_nils) { avgs[gid] = hge_nil; diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -5058,7 +5058,7 @@ BBPtmunlock(void) } void -BBPprintinfo(void) +BBPprintinfo(FILE *outf) { /* 32 categories for the bats, not all are expected to be filled */ struct counters { @@ -5070,7 +5070,8 @@ BBPprintinfo(void) int nskip = 0; if (!BBPtrytmlock(1000)) { - printf("BBP is currently locked, so no BAT information\n"); + fprintf(outf, + "BBP is currently locked, so no BAT information\n"); return; } bat sz = (bat) ATOMIC_GET(&BBPsize); @@ -5108,235 +5109,271 @@ BBPprintinfo(void) MT_lock_unset(&GDKcacheLock); } BBPtmunlock(); - printf("BATs:\n"); + fprintf(outf, "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%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))); + fprintf(outf, + "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, loaded, cold: %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))); + fprintf(outf, + "fix, dirty, persistent, loaded, cold: %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, not loaded, hot: %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))); + fprintf(outf, + "fix, dirty, persistent, not loaded, hot: %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%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))); + fprintf(outf, + "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%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))); + fprintf(outf, + "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, loaded, cold: %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))); + fprintf(outf, + "fix, dirty, transient, loaded, cold: %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, not loaded, hot: %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))); + fprintf(outf, + "fix, dirty, transient, not loaded, hot: %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%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))); + fprintf(outf, + "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%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))); + fprintf(outf, + "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, loaded, cold: %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))); + fprintf(outf, + "fix, clean, persistent, loaded, cold: %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, not loaded, hot: %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, _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
