Skip to content

Commit

Permalink
fixup! Add native coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Nov 6, 2023
1 parent fd05bbc commit 0ab67c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erts/emulator/beam/jit/asm_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ int beam_load_prepare_emit(LoaderState *stp) {
stp->line_coverage = erts_alloc(ERTS_ALC_T_CODE_COVERAGE,
alloc_size * coverage_size);
memset(stp->line_coverage, 0, alloc_size * coverage_size);
stp->line_coverage_valid =
erts_alloc(ERTS_ALC_T_CODE_COVERAGE, alloc_size);
stp->line_coverage_valid = erts_alloc(ERTS_ALC_T_CODE_COVERAGE,
alloc_size);
memset(stp->line_coverage_valid, 0, alloc_size);
hdr->line_coverage_len = alloc_size;
hdr->line_coverage_size = coverage_size;
}

if (erts_function_coverage) {
size_t alloc_size = hdr->num_functions;
stp->function_coverage =
erts_alloc(ERTS_ALC_T_CODE_COVERAGE, alloc_size);
stp->function_coverage = erts_alloc(ERTS_ALC_T_CODE_COVERAGE,
alloc_size);
memset(stp->function_coverage, 0, alloc_size);
}

Expand Down

0 comments on commit 0ab67c1

Please sign in to comment.