aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-11 17:01:54 +0100
committerRickard Green <[email protected]>2017-01-11 17:01:54 +0100
commit1ef677d76350ec14050a292fda47657f238fc496 (patch)
treef6ac520b9311a04028127ec03ef2d92625df3bd2 /erts/emulator/beam/beam_emu.c
parent16da88810cc3dccb0d67b7d1bd97874cadf1bc7b (diff)
parentad8229b57c8dcd8ff129398b53e3b81849daecc7 (diff)
downloadotp-1ef677d76350ec14050a292fda47657f238fc496.tar.gz
otp-1ef677d76350ec14050a292fda47657f238fc496.tar.bz2
otp-1ef677d76350ec14050a292fda47657f238fc496.zip
Merge branch 'maint'
* maint: Fix call_time trace for NIFs Conflicts: erts/emulator/beam/beam_emu.c
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index f64d2df8a8..c554bd73b6 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3549,12 +3549,6 @@ do { \
ErlHeapFragment *live_hf_end;
ErtsCodeMFA *codemfa;
- 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);
codemfa = erts_code_to_codemfa(I);
@@ -3563,8 +3557,8 @@ do { \
DTRACE_NIF_ENTRY(c_p, codemfa);
- SWAPOUT;
- c_p->fcalls = FCALLS - 1;
+ HEAVY_SWAPOUT;
+
PROCESS_MAIN_CHK_LOCKS(c_p);
bif_nif_arity = codemfa->arity;
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);