-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GC: Use upstream patch for green threads support #8225
Conversation
1d9dcd9
to
5b4319f
Compare
A build with the upstream patch is available in Unsigned rpm, deb packages and tar.gz can be downloaded from https://circleci.com/gh/crystal-lang/crystal/29489#artifacts/containers/0 in case someone is willing to smoke on their environment. |
5b4319f
to
883e8a1
Compare
On my side the smoke test went well. I've run the benchmarks and nothing explodes, memory consumption was similar than before. If someone else wants to confirm/try and review the changes we can move forward here. |
@bcardiff works for us 👍 |
@@ -17,6 +17,13 @@ lib LibGC | |||
alias SizeT = LibC::SizeT | |||
alias Word = LibC::ULong | |||
|
|||
struct StackBase | |||
mem_base : Void* | |||
# reg_base : Void* should be used also for IA-64 when/if supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will never support IA-64, the architecture is thoroughly dead.
I tested this patch with upstream GC changes at Arch Linux and it looks good. Thank you for the work. One the patch lands crystal repo I'll push a new Arch |
* Use bdw-gc upstream mt patch * Update distribution-scripts
This makes sure Fiber compiles on win32. Fixes a merge order issue with crystal-lang#8225 and crystal-lang#7995.
* Use bdw-gc upstream mt patch * Update distribution-scripts
This requires also an update of the distribution-scripts (
reason why this PR is draft).A compiler with the updated GC 8.0.4 + upstream patch will be available in circleci for a smoke testing. So far it seems to work locally.
The preview_mt jobs will fail with compilation issues since the 0.31.0 has the old patch bundled.
As of the changes itself, bdw-gc patch ended returning an opaque thread handler that is stored now in
Thread.gc_thread_handler
and aStackBase
structure that is the stackbottom in most architectures. In IA-64 includes the reg_base, but we don't support IA-64. Since the fibers only knows about the stackbottom, I preferred to leave the reg_base commented.Depends on: crystal-lang/distribution-scripts#47
Fixes: #8213