aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_trace.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-02-21 08:48:42 +0100
committerBjörn Gustavsson <[email protected]>2012-06-25 14:31:19 +0200
commitaa340f8d8a13b86f2938a4ce0b3c7d5807dec716 (patch)
tree50fd1280fd85ea9ab2766d584f94739b6acbd554 /erts/emulator/beam/erl_trace.c
parent17263978bd05535251aba8ec37cbd0a6756f57f7 (diff)
downloadotp-aa340f8d8a13b86f2938a4ce0b3c7d5807dec716.tar.gz
otp-aa340f8d8a13b86f2938a4ce0b3c7d5807dec716.tar.bz2
otp-aa340f8d8a13b86f2938a4ce0b3c7d5807dec716.zip
Change the data structures for breakpoints
Change the data structures for breakpoints to make it possible (in a future commit) to manage breakpoints without taking down the system to single-scheduling mode. The current "breakpoint wheel" data structure (a circular, double-linked list of breakpoints) was invented before the SMP emulator. To support it in the SMP emulator, there is essentially one breakpoint wheel per scheduler. As more breakpoint types have been added, the implementation has become messy and hard to understand and maintain. Therefore, the time for a rewrite has come. Use one struct to hold all breakpoint data for a breakpoint in a function. Use a flag field to indicate what different type of break actions that are enabled.
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r--erts/emulator/beam/erl_trace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index bc988cd61b..c64c9d8eee 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -2186,14 +2186,12 @@ erts_bif_trace(int bif_index, Process* p, Eterm* args, BeamInstr* I)
&meta_tracer_pid);
}
if (time) {
- BpDataTime *bdt = NULL;
+ BpDataTime *bdt;
BeamInstr *pc = (BeamInstr *)ep->code+3;
- bdt = (BpDataTime *) erts_get_time_break(p, pc);
- ASSERT(bdt);
-
- if (!bdt->pause) {
- erts_trace_time_break(p, pc, bdt, ERTS_BP_CALL_TIME_CALL);
+ bdt = erts_get_active_time_break(pc);
+ if (bdt) {
+ erts_trace_time_call(p, pc, bdt);
}
}
/* Restore original continuation pointer (if changed). */