Skip to content

Remove major/mark_weak1 and major/mark_weak2 from mark_slice_name#9004

Closed
abbysmal wants to merge 1 commit intoocaml:trunkfrom
abbysmal:instrumented_runtime_subphase_names
Closed

Remove major/mark_weak1 and major/mark_weak2 from mark_slice_name#9004
abbysmal wants to merge 1 commit intoocaml:trunkfrom
abbysmal:instrumented_runtime_subphase_names

Conversation

@abbysmal
Copy link
Copy Markdown
Contributor

@abbysmal abbysmal commented Oct 1, 2019

The value mark_slice_name used by the instrumented runtime to name the various substeps reflected by the caml_gc_subphase variable seems to be off.

mark_slice_name is defined here and major/mark_final equals 14
https://github.com/ocaml/ocaml/blob/trunk/runtime/major_gc.c#L609

This array is used by the instrumented runtime for logging purpose, accessing the array through the value of caml_gc_subphase:
https://github.com/ocaml/ocaml/blob/trunk/runtime/major_gc.c#L795

caml_gc_subphase however is only mutated to any of the following values:
https://github.com/ocaml/ocaml/blob/trunk/runtime/caml/major_gc.h#L49

So it seems that two names (major/mark_weak2 and major/mark_final) are not being used. Also major/mark_weak1 is logged when major/mark_final is expected.

It seems the defines were shuffled around when ephemerons were first introduced but this array was not kept up to date:

d5fffdd#diff-64b8b0eb170037392ede80351a5b5779

This PR removes major/mark_weak1 and major/mark_weak2 from mark_slice_name.

@abbysmal
Copy link
Copy Markdown
Contributor Author

abbysmal commented Dec 1, 2020

This was addressed by merging #9082 (as counters were rewritten and inconsistencies were fixed), I will close this issue.

@abbysmal abbysmal closed this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant