diff options
author | Rickard Green <[email protected]> | 2019-07-22 11:37:11 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-07-22 11:37:11 +0200 |
commit | 9d1b3bb0db87cf95cb821af01189f6d6be072f79 (patch) | |
tree | 03ca2d109430b8a51bb3aa452d88f34f991d67d9 /erts/emulator/beam/erl_db_catree.c | |
parent | aa928af9c9a147d1cdfebfaf26016ef17c389d18 (diff) | |
parent | bcffb7f5599efb62f13128e6feeb03a65cd9c11e (diff) | |
download | otp-9d1b3bb0db87cf95cb821af01189f6d6be072f79.tar.gz otp-9d1b3bb0db87cf95cb821af01189f6d6be072f79.tar.bz2 otp-9d1b3bb0db87cf95cb821af01189f6d6be072f79.zip |
Merge branch 'maint'
* maint:
Fix etp-ets-tables
Fix node refc test for free processes hanging around
Enhanced node refc bookkeeping
Fix node container refc tests of ETS
Fix node refc test of external data
Node container refc test for persistent terms
Include persistent term storage in node/dist refc check
Fix node refc test for system message queue
Diffstat (limited to 'erts/emulator/beam/erl_db_catree.c')
-rw-r--r-- | erts/emulator/beam/erl_db_catree.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_db_catree.c b/erts/emulator/beam/erl_db_catree.c index fed4b44a9b..8a89eb72df 100644 --- a/erts/emulator/beam/erl_db_catree.c +++ b/erts/emulator/beam/erl_db_catree.c @@ -2395,6 +2395,34 @@ void db_calc_stats_catree(DbTableCATree* tb, DbCATreeStats* stats) } while (depth > 0); } +struct debug_catree_fa { + void (*func)(ErlOffHeap *, void *); + void *arg; +}; + +static void debug_free_route_node(void *vfap, ErtsThrPrgrVal val, void *vnp) +{ + DbTableCATreeNode *np = vnp; + if (np->u.route.key.oh) { + struct debug_catree_fa *fap = vfap; + ErlOffHeap oh; + ERTS_INIT_OFF_HEAP(&oh); + oh.first = np->u.route.key.oh; + (*fap->func)(&oh, fap->arg); + } +} + +void +erts_db_foreach_thr_prgr_offheap_catree(void (*func)(ErlOffHeap *, void *), + void *arg) +{ + struct debug_catree_fa fa; + fa.func = func; + fa.arg = arg; + erts_debug_later_op_foreach(do_free_route_node, debug_free_route_node, &fa); +} + + #ifdef HARDDEBUG /* |