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

Fix jitlayers aotcompile #50

Closed
wants to merge 7 commits into from

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented May 17, 2024

This PR fixes a few issues in jitlayers.cpp and aotcompile.cpp so they are compliant with the GC checker. More logging and tests for GC checker.

if (*src_out && jl_is_method(def))
if (*src_out && jl_is_method(def)) {
PTR_PIN(def);
PTR_PIN(codeinst);
*src_out = jl_uncompress_ir(def, codeinst, (jl_array_t*)*src_out);
Copy link

Choose a reason for hiding this comment

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

Why we don't need to pin *src_out, as it seems it's been cast to jl_array_t*?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am looking at this. It looks like a bug. The arg jl_value_t **src_out is pinned, but we cannot say *src is pinned.

@qinsoon
Copy link
Member Author

qinsoon commented May 28, 2024

@udesou

I fixed some issues in GCChecker. Can you take a look at the PR again? You can focus on the changes about the test cases, regarding to pinning, which are simple cases, and the changes in jitlayers.cpp and aotcompile.cpp. There could still be more issues with GCChecker -- if you find any, just let me know.

I am not sure if we want to merge this PR at all. Maybe we should only merge changes in GCChecker so we can use it to check the runtime code. We keep runtime changes in a separate branch. We only merge runtime changes after we go through the entire runtime code base, fixing pinning issues and verify correctness and performance. What do you think?

@qinsoon
Copy link
Member Author

qinsoon commented May 29, 2024

@udesou

I fixed some issues in GCChecker. Can you take a look at the PR again? You can focus on the changes about the test cases, regarding to pinning, which are simple cases, and the changes in jitlayers.cpp and aotcompile.cpp. There could still be more issues with GCChecker -- if you find any, just let me know.

I am not sure if we want to merge this PR at all. Maybe we should only merge changes in GCChecker so we can use it to check the runtime code. We keep runtime changes in a separate branch. We only merge runtime changes after we go through the entire runtime code base, fixing pinning issues and verify correctness and performance. What do you think?

I created two separate PRs. #51 fixes the GCChecker, which I suggest to be merged as soon as we can. And #52 fixes the runtime code, which I suggest to remain a draft until we go through and fix the entire code base.

I am closing this PR.

@qinsoon qinsoon closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants