diff options
author | Lukas Larsson <[email protected]> | 2016-05-03 10:18:59 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-05-03 10:18:59 +0200 |
commit | e36b604cb3fe58fcd7a8916d8498b5f2182ddcff (patch) | |
tree | 27949ccebd800e7b0ee08b2209b1cbe8b90ceb77 /erts/emulator/beam/erl_gc.c | |
parent | 0dcc4dad547fb7774f9c3b964fadec14fda15243 (diff) | |
parent | e1c70e582bc9e9eddd56d5483e59edc6eb75c3a6 (diff) | |
download | otp-e36b604cb3fe58fcd7a8916d8498b5f2182ddcff.tar.gz otp-e36b604cb3fe58fcd7a8916d8498b5f2182ddcff.tar.bz2 otp-e36b604cb3fe58fcd7a8916d8498b5f2182ddcff.zip |
Merge branch 'lukas/erts/rename_xmqd_to_hmqd/OTP-13366'
* lukas/erts/rename_xmqd_to_hmqd/OTP-13366:
erts: Rename erl flag +xmqd to +hmqd in erlexec
Fix proc_lib message_queue_data spec
erts: Fix total_heap_size calculation for on_heap
erts: Rename erl flag +xmqd to +hmqd
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index df5d0f4918..cf54f1e384 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -3009,10 +3009,30 @@ erts_process_gc_info(Process *p, Uint *sizep, Eterm **hpp) }; Eterm res = THE_NON_VALUE; + ErtsMessage *mp; ERTS_CT_ASSERT(sizeof(values)/sizeof(*values) == sizeof(tags)/sizeof(*tags)); ERTS_CT_ASSERT(sizeof(values)/sizeof(*values) == ERTS_PROCESS_GC_INFO_MAX_TERMS); + if (p->abandoned_heap) { + Eterm *htop, *heap; + ERTS_GET_ORIG_HEAP(p, heap, htop); + values[3] = HIGH_WATER(p) - heap; + values[6] = htop - heap; + } + + if (p->flags & F_ON_HEAP_MSGQ) { + /* If on heap messages in the internal queue are counted + as being part of the heap, so we have to add them to the + am_mbuf_size value. process_info(total_heap_size) should + be the same as adding old_heap_block_size + heap_block_size + + mbuf_size. + */ + for (mp = p->msg.first; mp; mp = mp->next) + if (mp->data.attached) + values[2] += erts_msg_attached_data_size(mp); + } + res = erts_bld_atom_uword_2tup_list(hpp, sizep, sizeof(values)/sizeof(*values), |