aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix/etp-commands.in
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-04-24 18:31:33 +0200
committerSverker Eriksson <[email protected]>2019-04-24 18:31:46 +0200
commit92496714d51b391259220794c5cd49e3bccb336a (patch)
tree1999a0636bffc8b4a6fee13966ac7a10b2b83652 /erts/etc/unix/etp-commands.in
parent36728a46f2675bb47a9c9c35c820d49f2ce6f8e7 (diff)
downloadotp-92496714d51b391259220794c5cd49e3bccb336a.tar.gz
otp-92496714d51b391259220794c5cd49e3bccb336a.tar.bz2
otp-92496714d51b391259220794c5cd49e3bccb336a.zip
erts: Fix etp-block2mbc
Diffstat (limited to 'erts/etc/unix/etp-commands.in')
-rw-r--r--erts/etc/unix/etp-commands.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index 14cd2e587a..66d6d20c4e 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -4138,7 +4138,7 @@ define etp-block2mbc-1
set $etp_mbc = ($arg0)->u.carrier
else
# Allocated block
- set $etp_mbc = (Carrier_t*) ((((UWord)($arg0) >> 18) - (($arg0)->bhdr >> $etp_MBC_ABLK_OFFSET_SHIFT)) << 18)
+ set $etp_mbc = (Carrier_t*) ((((UWord)($arg0) >> 18) - ((($arg0)->bhdr & $etp_MBC_ABLK_OFFSET_MASK) >> $etp_MBC_ABLK_OFFSET_SHIFT)) << 18)
end
end
@@ -4415,13 +4415,14 @@ define etp-init
set $etp_arch64 = (sizeof(void *) == 8)
if $etp_arch64
set $etp_nil = 0xfffffffffffffffb
- set $etp_MBC_ABLK_OFFSET_SHIFT = (64 - 24)
+ set $etp_MBC_ABLK_OFFSET_BITS = 23
else
set $etp_nil = 0xfffffffb
- set $etp_MBC_ABLK_OFFSET_SHIFT = (32 - 9)
+ set $etp_MBC_ABLK_OFFSET_BITS = 8
end
+ set $etp_MBC_ABLK_OFFSET_SHIFT = (sizeof(UWord)*8 - 1 - $etp_MBC_ABLK_OFFSET_BITS)
+ set $etp_MBC_ABLK_OFFSET_MASK = ((((UWord)1 << $etp_MBC_ABLK_OFFSET_BITS) - 1) << $etp_MBC_ABLK_OFFSET_SHIFT)
set $etp_MBC_ABLK_SZ_MASK = ((UWord)1 << $etp_MBC_ABLK_OFFSET_SHIFT) - 1 - 7
-
set $etp_flat = 0
set $etp_chart_id = 0
set $etp_chart = 0