diff options
author | Sverker Eriksson <[email protected]> | 2016-05-02 18:40:10 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-04 19:53:38 +0200 |
commit | 6197aa2498bcb35e331c9112a70635f55047bf26 (patch) | |
tree | 4b9a73f18f2eb6c4b8b9e8b907787d2948ea0922 /erts/emulator/beam | |
parent | d0ffd5c2a84d15d94dcbc8bac98d527bfc1d4a3c (diff) | |
download | otp-6197aa2498bcb35e331c9112a70635f55047bf26.tar.gz otp-6197aa2498bcb35e331c9112a70635f55047bf26.tar.bz2 otp-6197aa2498bcb35e331c9112a70635f55047bf26.zip |
erts: Fix bug in trace_pattern for 'on_load'
'on_load' is a call trace.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) { |