Skip to content

Commit 5d651b9

Browse files
committed
Merge branch 'maint'
2 parents 7d1dfc9 + 92a82c1 commit 5d651b9

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

erts/emulator/beam/break.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@ loaded(fmtfn_t to, void *to_arg)
480480
ErtsCodeIndex code_ix;
481481

482482
code_ix = erts_active_code_ix();
483-
erts_rlock_old_code(code_ix);
483+
if (!ERTS_IS_CRASH_DUMPING) {
484+
erts_rlock_old_code(code_ix);
485+
}
484486

485487
/*
486488
* Calculate and print totals.
@@ -552,7 +554,9 @@ loaded(fmtfn_t to, void *to_arg)
552554
}
553555
}
554556
}
555-
erts_runlock_old_code(code_ix);
557+
if (!ERTS_IS_CRASH_DUMPING) {
558+
erts_runlock_old_code(code_ix);
559+
}
556560
}
557561

558562

erts/emulator/beam/erl_process_dump.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,9 @@ init_literal_areas(void)
795795
ErtsCodeIndex code_ix;
796796
ErtsLiteralArea** area_p;
797797

798+
ERTS_LC_ASSERT(ERTS_IS_CRASH_DUMPING);
799+
798800
code_ix = erts_active_code_ix();
799-
erts_rlock_old_code(code_ix);
800801

801802
lit_areas = area_p = erts_dump_lit_areas;
802803
num_lit_areas = 0;
@@ -825,8 +826,6 @@ init_literal_areas(void)
825826

826827
qsort(erts_persistent_areas, erts_num_persistent_areas,
827828
sizeof(ErtsLiteralArea *), compare_areas);
828-
829-
erts_runlock_old_code(code_ix);
830829
}
831830

832831
static int search_areas(const void * a, const void * b) {
@@ -868,12 +867,10 @@ static void mark_literal(Eterm* ptr)
868867
static void
869868
dump_literals(fmtfn_t to, void *to_arg)
870869
{
871-
ErtsCodeIndex code_ix;
872870
int i;
873871
Uint idx;
874872

875-
code_ix = erts_active_code_ix();
876-
erts_rlock_old_code(code_ix);
873+
ERTS_LC_ASSERT(ERTS_IS_CRASH_DUMPING);
877874

878875
erts_print(to, to_arg, "=literals\n");
879876

@@ -889,8 +886,6 @@ dump_literals(fmtfn_t to, void *to_arg)
889886
}
890887
}
891888

892-
erts_runlock_old_code(code_ix);
893-
894889
for (idx = 0; idx < erts_num_persistent_areas; idx++) {
895890
dump_module_literals(to, to_arg, erts_persistent_areas[idx]);
896891
}

0 commit comments

Comments
 (0)