Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove global ROOT_NODES/EDGES (merge after #86) #89

Merged
merged 6 commits into from
Aug 14, 2023

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Aug 7, 2023

This PR is based on #86.

  • Move stack scanning code to Rust, and implement Scanning::scan_roots_in_mutator_thread.
    • Implement necessary types/functions in Rust.
    • It is not necessary to implement this in Rust. However, it needs to use scan_gcstack(), which is implemented in Rust, and used for object scanning. It would be better to remove our implementation for it in C.
  • Create scan_vm_specific_roots, and call it in Scanning::scan_vm_specific_roots.
    • Allow using RootsWorkFactory in C
  • Remove global ROOT_NODES/EDGES as they are no longer used.
  • Add assertions to check type size for our Rust and C types.

@qinsoon qinsoon marked this pull request as ready for review August 9, 2023 23:43
@qinsoon qinsoon requested a review from udesou August 9, 2023 23:43
Copy link
Contributor

@udesou udesou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. This might require a few changes to support moving immix (tpinned roots), but I believe these changes introduced here aren't gonna impact on supporting tpinned roots.

@udesou
Copy link
Contributor

udesou commented Aug 11, 2023

Does this impact performance in any way? Have you tested it with the previous benchmarks? I'm just wondering whether it would help at least a bit since it removes those locks.

@qinsoon
Copy link
Member Author

qinsoon commented Aug 11, 2023

Does this impact performance in any way? Have you tested it with the previous benchmarks? I'm just wondering whether it would help at least a bit since it removes those locks.

I haven't tested that. It should improve the stack scanning. But I am not sure how much it matters for the whole GC time. I see this PR as a cleanup rather than an optimization. But anyway, I will run the benchmarks.

@qinsoon
Copy link
Member Author

qinsoon commented Aug 13, 2023

This is the result (compared with Julia GC). It seems we only see a clear improvement in pidigits. I think the reason is that stack scanning is a fixed cost per GC and we trigger much more GCs in pidigits than other benchmarks. So the improvement is only visible for pidigits.
output

@qinsoon qinsoon enabled auto-merge (squash) August 13, 2023 23:50
@qinsoon qinsoon merged commit 00e0a6d into mmtk:master Aug 14, 2023
7 checks passed
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.

2 participants