diff options
author | Rickard Green <[email protected]> | 2016-11-08 09:51:03 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-01-12 15:22:26 +0100 |
commit | 04e119e22a68d686b9e8df17c0a4836c4a5b91ea (patch) | |
tree | 59c7519927a8d72a31ae2ff609bd2db5acd29d4a /erts/emulator/beam/erl_nif.c | |
parent | 95ec5d385cfba23c770d946871c0197bf374ff3c (diff) | |
download | otp-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_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index fd756692f9..d946844f15 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -2290,9 +2290,9 @@ erts_nif_export_cleanup_nif_mod(NifExport *ep) } static ERTS_INLINE void -nif_export_restore(Process *c_p, NifExport *ep) +nif_export_restore(Process *c_p, NifExport *ep, Eterm res) { - erts_nif_export_restore(c_p, ep); + erts_nif_export_restore(c_p, ep, res); ASSERT(ep->m); nif_export_cleanup_nif_mod(ep); } @@ -2320,7 +2320,7 @@ dirty_nif_finalizer(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) ASSERT(!ERTS_SCHEDULER_IS_DIRTY(erts_proc_sched_data(proc))); ep = (NifExport*) ERTS_PROC_GET_NIF_TRAP_EXPORT(proc); ASSERT(ep); - nif_export_restore(proc, ep); + nif_export_restore(proc, ep, argv[0]); return argv[0]; } @@ -2462,7 +2462,7 @@ execute_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* Done (not rescheduled)... */ ASSERT(ep->func == ERTS_DBG_NIF_NOT_SCHED_MARKER); if (!env->exception_thrown) - nif_export_restore(proc, ep); + nif_export_restore(proc, ep, result); else { nif_export_cleanup_nif_mod(ep); /* |