aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-11 16:57:38 +0100
committerRickard Green <[email protected]>2017-01-11 16:57:38 +0100
commitad8229b57c8dcd8ff129398b53e3b81849daecc7 (patch)
tree14fe3de7a1d46d656957634fc13427d39dd0b504
parent9d029dd04ad1a6a9e9725952b83d7cbdddfca088 (diff)
parenta0d79ee6eeca9d99fbb644717ee2df57b824a527 (diff)
downloadotp-ad8229b57c8dcd8ff129398b53e3b81849daecc7.tar.gz
otp-ad8229b57c8dcd8ff129398b53e3b81849daecc7.tar.bz2
otp-ad8229b57c8dcd8ff129398b53e3b81849daecc7.zip
Merge branch 'rickard/nif-call-time-trace-bug' into maint
OTP-14136 * rickard/nif-call-time-trace-bug: Fix call_time trace for NIFs
-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 66bccedd94..f392feb06b 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3552,18 +3552,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);