diff options
author | Simon Cornish <[email protected]> | 2016-04-25 22:25:56 -0700 |
---|---|---|
committer | Simon Cornish <[email protected]> | 2016-04-25 22:25:56 -0700 |
commit | 43416d57174d93660aec1620eeef0b05271b43e6 (patch) | |
tree | 704defc221118050414d3a69adb08e9a9f369284 /erts/emulator | |
parent | 523e048754f5086a6cc4fd9a250e1b495fc5b9b8 (diff) | |
download | otp-43416d57174d93660aec1620eeef0b05271b43e6.tar.gz otp-43416d57174d93660aec1620eeef0b05271b43e6.tar.bz2 otp-43416d57174d93660aec1620eeef0b05271b43e6.zip |
Print heap pointers for garbing processes during crashdump
In an SMP emulator, print_garb_info doesn't do anything because the
heap pointers could be invalid.
However, when crashdumping there are no schedulers running so it's ok
to print this additional information which could be useful when
examining a core file.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/break.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c index 0ddf7f4e6d..e0164c3c73 100644 --- a/erts/emulator/beam/break.c +++ b/erts/emulator/beam/break.c @@ -347,8 +347,11 @@ print_process_info(int to, void *to_arg, Process *p) static void print_garb_info(int to, void *to_arg, Process* p) { +#ifdef ERTS_SMP /* ERTS_SMP: A scheduler is probably concurrently doing gc... */ -#ifndef ERTS_SMP + if (!ERTS_IS_CRASH_DUMPING) + return; +#endif erts_print(to, to_arg, "New heap start: %bpX\n", p->heap); erts_print(to, to_arg, "New heap top: %bpX\n", p->htop); erts_print(to, to_arg, "Stack top: %bpX\n", p->stop); @@ -356,7 +359,6 @@ print_garb_info(int to, void *to_arg, Process* p) erts_print(to, to_arg, "Old heap start: %bpX\n", OLD_HEAP(p)); erts_print(to, to_arg, "Old heap top: %bpX\n", OLD_HTOP(p)); erts_print(to, to_arg, "Old heap end: %bpX\n", OLD_HEND(p)); -#endif } void |