aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-11-08 09:51:03 +0100
committerRickard Green <[email protected]>2017-01-12 15:22:26 +0100
commit04e119e22a68d686b9e8df17c0a4836c4a5b91ea (patch)
tree59c7519927a8d72a31ae2ff609bd2db5acd29d4a /erts/emulator/beam/erl_alloc.c
parent95ec5d385cfba23c770d946871c0197bf374ff3c (diff)
downloadotp-04e119e22a68d686b9e8df17c0a4836c4a5b91ea.tar.gz
otp-04e119e22a68d686b9e8df17c0a4836c4a5b91ea.tar.bz2
otp-04e119e22a68d686b9e8df17c0a4836c4a5b91ea.zip
Return and exception trace for nif-export scheduled BIFs
The support is somewhat primitive, since it is determined at call time if trace on return or exception should be sent.
Diffstat (limited to 'erts/emulator/beam/erl_alloc.c')
-rw-r--r--erts/emulator/beam/erl_alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index 40a45c961f..4d990a9c56 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -44,6 +44,7 @@
#include "erl_hl_timer.h"
#include "erl_cpu_topology.h"
#include "erl_thr_queue.h"
+#include "erl_nfunc_sched.h"
#if defined(ERTS_ALC_T_DRV_SEL_D_STATE) || defined(ERTS_ALC_T_DRV_EV_D_STATE)
#include "erl_check_io.h"
#endif
@@ -679,6 +680,8 @@ erts_alloc_init(int *argc, char **argv, ErtsAllocInitOpts *eaiop)
fix_type_sizes[ERTS_ALC_FIX_TYPE_IX(ERTS_ALC_T_ABIF_TIMER)]
= erts_timer_type_size(ERTS_ALC_T_ABIF_TIMER);
#endif
+ fix_type_sizes[ERTS_ALC_FIX_TYPE_IX(ERTS_ALC_T_NIF_EXP_TRACE)]
+ = sizeof(NifExportTrace);
#ifdef HARD_DEBUG
hdbg_init();
@@ -2437,6 +2440,10 @@ erts_memory(fmtfn_t *print_to_p, void *print_to_arg, void *proc, Eterm earg)
fi,
ERTS_ALC_T_ABIF_TIMER);
#endif
+ add_fix_values(&size.processes,
+ &size.processes_used,
+ fi,
+ ERTS_ALC_T_NIF_EXP_TRACE);
}
if (want.atom || want.atom_used) {