From 6197aa2498bcb35e331c9112a70635f55047bf26 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 2 May 2016 18:40:10 +0200 Subject: erts: Fix bug in trace_pattern for 'on_load' 'on_load' is a call trace. --- erts/emulator/beam/erl_db_util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'erts') diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index 051c107d1f..95b1cd0148 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -1002,10 +1002,14 @@ Binary *erts_match_set_compile(Process *p, Eterm matchexpr, Eterm MFA) { Binary *bin; Uint sz; Eterm *hp; - Uint flags = DCOMP_TRACE; + Uint flags; - if (is_tuple(MFA)) flags |= DCOMP_CALL_TRACE; - if (MFA != am_receive) flags |= DCOMP_ALLOW_TRACE_OPS; + switch (MFA) { + case am_receive: flags = DCOMP_TRACE; break; + case am_send: flags = DCOMP_TRACE | DCOMP_ALLOW_TRACE_OPS; break; + default: + flags = DCOMP_TRACE | DCOMP_CALL_TRACE | DCOMP_ALLOW_TRACE_OPS; + } bin = db_match_set_compile(p, matchexpr, flags); if (bin != NULL) { -- cgit v1.2.3