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/etc/unix/etp-commands.in | |
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/etc/unix/etp-commands.in')
-rw-r--r-- | erts/etc/unix/etp-commands.in | 75 |
1 files changed, 66 insertions, 9 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in index 8b6abb5336..20809d61e8 100644 --- a/erts/etc/unix/etp-commands.in +++ b/erts/etc/unix/etp-commands.in @@ -3993,22 +3993,79 @@ end # ETS table debug # +define etp-ets-tab-status-int +# Args: +# +# Non-reentrant + if ($arg0 & 0x1) + printf "priv" + end + if ($arg0 & 0x2) + printf "prot" + end + if ($arg0 & 0x4) + printf "pub" + end + if ($arg0 & 0x8) + printf "|del" + end + if ($arg0 & 0x10) + printf "|set" + end + if ($arg0 & 0x20) + printf "|bag" + end + if ($arg0 & 0x40) + printf "|dbag" + end + if ($arg0 & 0x80) + printf "|oset" + end + if ($arg0 & 0x100) + printf "|caoset" + end + if ($arg0 & 0x200) + printf "|flocked" + end + if ($arg0 & 0x400) + printf "|fread" + end + if ($arg0 & 0x800) + printf "|named" + end + if ($arg0 & 0x1000) + printf "|busy" + end +end + define etp-ets-tables # Args: # # Non-reentrant - printf "%% Dumping < %lu ETS tables\n", (unsigned long)db_max_tabs - while $etp_ets_tables_i < db_max_tabs - if (meta_main_tab[$etp_ets_tables_i].u.next_free & 3) == 0 - printf "%% %d:", $etp_ets_tables_i - etp-1 ((Eterm)(meta_main_tab[$etp_ets_tables_i].u.tb->common.id)) 0 + set $sched_ix = 0 + while $sched_ix < erts_no_schedulers + set $ets_tabs = &erts_aligned_scheduler_data[$sched_ix].esd.ets_tables + set $no_ets_tabs = *(unsigned long *)&($ets_tabs->count) + printf "\n%% %lu ETS tables created on scheduler %lu...\n\n", $no_ets_tabs, (unsigned long)$sched_ix+1 + set $ets_tab = $ets_tabs->clist + set $first_ets_tab = $ets_tab + while $ets_tab + set $refn = &((ErtsMagicBinary *)$ets_tab->common->btid)->refn + printf "%% " + etp-1 $ets_tab->common.the_name 0 + printf " #Ref<0.%u.%u.%u> ", (unsigned)$refn[2], (unsigned)$refn[1], (unsigned)$refn[0] + etp-1 $ets_tab->common.owner 0 printf " " - etp-1 ((Eterm)(meta_main_tab[$etp_ets_tables_i].u.tb->common.owner)) 0 - printf "\n" + etp-ets-tab-status-int $ets_tab->common.status + printf " (DbTable*)%p\n", $ets_tab + if $ets_tab->common.all.next == $first_ets_tab + set $ets_tab = (DbTable *) 0 + else + set $ets_tab = $ets_tab->common.all.next + end end - set $etp_ets_tables_i++ + set $sched_ix++ end - set $etp_ets_tables_i = 0 end document etp-ets-tables |