aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-05-11 17:16:27 +0200
committerRickard Green <[email protected]>2016-05-11 17:16:27 +0200
commit18fbb49321d716d4590d24512696b665e857d623 (patch)
tree24d0c78cec3abc0c7466ecbba5385d19ee750b53 /erts/emulator/beam/erl_process.c
parent8b544b523d915d1a54d505ec34182676f183a5e0 (diff)
parent3471d44a6a5ed5ab038c4cdc76b350119fe745e2 (diff)
downloadotp-18fbb49321d716d4590d24512696b665e857d623.tar.gz
otp-18fbb49321d716d4590d24512696b665e857d623.tar.bz2
otp-18fbb49321d716d4590d24512696b665e857d623.zip
Merge branch 'lukas/trace-fix'
* lukas/trace-fix: erts: Only allow remove from trace_status callback
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index e632e3d5b5..a853ec585b 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -10085,7 +10085,10 @@ Process *schedule(Process *p, int calls)
erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
- if (IS_TRACED(p)) {
+ /* Clear tracer if it has been removed */
+ if (IS_TRACED(p) && erts_is_tracer_proc_enabled(
+ p, ERTS_PROC_LOCK_MAIN, &p->common)) {
+
if (state & ERTS_PSFLG_EXITING) {
if (ARE_TRACE_FLAGS_ON(p, F_TRACE_SCHED_EXIT))
trace_sched(p, ERTS_PROC_LOCK_MAIN, am_in_exiting);
@@ -10100,12 +10103,6 @@ Process *schedule(Process *p, int calls)
}
}
-
-#ifdef ERTS_SMP
- /* Clears tracer if it has been removed */
- (void)ERTS_TRACER_PROC_IS_ENABLED(p);
-#endif
-
if (state & (ERTS_PSFLG_RUNNING_SYS
| ERTS_PSFLG_DIRTY_RUNNING_SYS)) {
/*