From 414f4fb8dc9a188f8148a1f92e5f9125108e170d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 16 Dec 2011 13:02:09 +0100 Subject: Optimize process table access --- erts/emulator/beam/beam_bp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/beam_bp.c') diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c index d772bea02f..f4e7119d4d 100644 --- a/erts/emulator/beam/beam_bp.c +++ b/erts/emulator/beam/beam_bp.c @@ -1255,7 +1255,7 @@ static int clear_function_break(Module *m, BeamInstr *pc, int bif, BeamInstr bre for (j = 0; j < bdt->hash[i].n; ++j) { item = &(bdt->hash[i].item[j]); if (item->pid != NIL) { - h_p = process_tab[internal_pid_index(item->pid)]; + h_p = erts_proc_lookup(item->pid); if (h_p) { pbt = ERTS_PROC_SET_CALL_TIME(h_p, ERTS_PROC_LOCK_MAIN, NULL); if (pbt) { -- cgit v1.2.3 From 4bcffe41e193bfa03f54f77e2158b3d989a001d0 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 27 Feb 2012 18:45:47 +0100 Subject: Optimize process state changes --- erts/emulator/beam/beam_bp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/beam_bp.c') diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c index f4e7119d4d..a6e00f87e0 100644 --- a/erts/emulator/beam/beam_bp.c +++ b/erts/emulator/beam/beam_bp.c @@ -713,7 +713,7 @@ void erts_trace_time_break(Process *p, BeamInstr *pc, BpDataTime *bdt, Uint type BpDataTime *pbdt = NULL; ASSERT(p); - ASSERT(p->status == P_RUNNING); + ASSERT(ERTS_PSFLG_RUNNING & erts_smp_atomic32_read_acqb(&p->state)); /* get previous timestamp and breakpoint * from the process psd */ -- cgit v1.2.3