aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-04-01 15:38:16 +0200
committerSverker Eriksson <[email protected]>2016-05-04 19:53:37 +0200
commit9627711cc39fd311a573a172e6d0e8a6b55dbd17 (patch)
tree639ae3441ca188987876b2cdc863690d4718eacf /erts/emulator/beam/erl_db_util.c
parent5cb62b003d082c5a32ef5b12a89d872a317fd05f (diff)
downloadotp-9627711cc39fd311a573a172e6d0e8a6b55dbd17.tar.gz
otp-9627711cc39fd311a573a172e6d0e8a6b55dbd17.tar.bz2
otp-9627711cc39fd311a573a172e6d0e8a6b55dbd17.zip
erts: Add Sender in 'receive' trace matchspec
All 'EXIT' and monitor messages are sent from 'system' Timeouts are "sent" from 'clock_service'
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index ae2cc40bfa..7d64529250 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -414,17 +414,19 @@ get_match_pseudo_process(Process *c_p, Uint heap_size)
{
ErtsMatchPseudoProcess *mpsp;
#ifdef ERTS_SMP
- mpsp = (ErtsMatchPseudoProcess *) c_p->scheduler_data->match_pseudo_process;
+ ErtsSchedulerData *esdp = c_p ? c_p->scheduler_data : erts_get_scheduler_data();
+
+ mpsp = (ErtsMatchPseudoProcess *) esdp->match_pseudo_process;
if (mpsp)
cleanup_match_pseudo_process(mpsp, 0);
else {
ASSERT(erts_smp_tsd_get(match_pseudo_process_key) == NULL);
mpsp = create_match_pseudo_process();
- c_p->scheduler_data->match_pseudo_process = (void *) mpsp;
+ esdp->match_pseudo_process = (void *) mpsp;
erts_smp_tsd_set(match_pseudo_process_key, (void *) mpsp);
}
ASSERT(mpsp == erts_smp_tsd_get(match_pseudo_process_key));
- mpsp->process.scheduler_data = c_p->scheduler_data;
+ mpsp->process.scheduler_data = esdp;
#else
mpsp = match_pseudo_process;
cleanup_match_pseudo_process(mpsp, 0);
@@ -1750,7 +1752,7 @@ Eterm db_prog_match(Process *c_p,
Eterm *esp;
MatchVariable* variables;
BeamInstr *cp;
- UWord *pc = prog->text;
+ const UWord *pc = prog->text;
Eterm *ehp;
Eterm ret;
Uint n;
@@ -1773,13 +1775,15 @@ Eterm db_prog_match(Process *c_p,
ERTS_UNDEF(n,0);
+ ASSERT(c_p || !(in_flags & ERTS_PAM_COPY_RESULT));
+
mpsp = get_match_pseudo_process(c_p, prog->heap_size);
psp = &mpsp->process;
/* We need to lure the scheduler into believing in the pseudo process,
because of floating point exceptions. Do *after* mpsp is set!!! */
- esdp = ERTS_GET_SCHEDULER_DATA_FROM_PROC(c_p);
+ esdp = ERTS_GET_SCHEDULER_DATA_FROM_PROC(psp);
ASSERT(esdp != NULL);
current_scheduled = esdp->current_process;
/* SMP: psp->scheduler_data is set by get_match_pseudo_process */