aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-02-09 15:53:31 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:23:08 +0100
commit8880cb9681f11f91928dc291f2a8ec7ff1934bcd (patch)
treeefb074eadb47bc77e5580b49a4c32a73393e8a95
parent7985815fc4c25c6bfc5d6101cd862138060098b9 (diff)
downloadotp-8880cb9681f11f91928dc291f2a8ec7ff1934bcd.tar.gz
otp-8880cb9681f11f91928dc291f2a8ec7ff1934bcd.tar.bz2
otp-8880cb9681f11f91928dc291f2a8ec7ff1934bcd.zip
erts: Fix single threaded fallback in new BIF finish_loading_1
Must "start staging" even when we go single threaded.
-rw-r--r--erts/emulator/beam/beam_bif_load.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 98e5ad1e3f..8a2169f9e6 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -248,14 +248,18 @@ finish_loading_1(BIF_ALIST_1)
for (i = 0; i < n; i++) {
p[i].modp = erts_put_module(p[i].module);
+ }
+ for (i = 0; i < n; i++) {
if (p[i].modp->curr.num_breakpoints > 0 ||
p[i].modp->curr.num_traced_exports > 0 ||
erts_is_default_trace_enabled()) {
+ /* tracing involved, fallback with thread blocking */
erts_abort_staging_code_ix();
erts_unlock_code_ix();
erts_smp_proc_unlock(BIF_P, ERTS_PROC_LOCK_MAIN);
erts_smp_thr_progress_block();
is_blocking = 1;
+ erts_start_staging_code_ix();
break;
}
}