aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-10 20:40:56 +0100
committerRickard Green <[email protected]>2017-01-10 20:40:56 +0100
commita0d79ee6eeca9d99fbb644717ee2df57b824a527 (patch)
tree0d6dc74b5a6e4b19a3361c356998cd202f3fd44a /erts/emulator
parent3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff)
downloadotp-a0d79ee6eeca9d99fbb644717ee2df57b824a527.tar.gz
otp-a0d79ee6eeca9d99fbb644717ee2df57b824a527.tar.bz2
otp-a0d79ee6eeca9d99fbb644717ee2df57b824a527.zip
Fix call_time trace for NIFs
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/beam_emu.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 59a9ea1417..6ac156a15d 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3550,18 +3550,11 @@ do { \
BifFunction vbf;
ErlHeapFragment *live_hf_end;
- if (!((FCALLS - 1) > 0 || (FCALLS - 1) > neg_o_reds)) {
- /* If we have run out of reductions, we do a context
- switch before calling the nif */
- goto context_switch;
- }
-
ERTS_MSACC_SET_STATE_CACHED_M_X(ERTS_MSACC_STATE_NIF);
DTRACE_NIF_ENTRY(c_p, (Eterm)I[-3], (Eterm)I[-2], (Uint)I[-1]);
c_p->current = I-3; /* current and vbf set to please handle_error */
- SWAPOUT;
- c_p->fcalls = FCALLS - 1;
+ HEAVY_SWAPOUT;
PROCESS_MAIN_CHK_LOCKS(c_p);
bif_nif_arity = I[-1];
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);