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

gc_mark_task improvements #9461

Closed
wants to merge 2 commits into from
Closed

gc_mark_task improvements #9461

wants to merge 2 commits into from

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Dec 25, 2014

this is more careful in gc_mark_task given that part of the jl_root_task stack may not have been moved (also don't bother copying some of the top of it)

with the recent changes to julia_init, this scenario was possible, if julia_init was called from a lower stack frame then any call to jl_apply. this only applied to embedded context, since this doesn't happen for repl.c. however, since it can handle it, i also make use of this to skip copying the first 1024 bytes of the root task.

@JeffBezanson done as a PR so you can check that my >= conditions are correct (with the assumption that the stack grows down)

@vtjnash
Copy link
Member Author

vtjnash commented Dec 25, 2014

(travis failure appears to be due to homebrew spending it's allotted hour trying to build gcc from scratch, rather than actually testing julia)

@vtjnash
Copy link
Member Author

vtjnash commented Jan 12, 2015

@JeffBezanson bump. thoughts?

…ay not have been moved (also don't bother copying some of the top of it). be accurate in gc_mark_task offset computation, esp for stack frames that may be partially moved
@vtjnash vtjnash force-pushed the jn/roottask_stackbase branch from 5348c91 to 1f0071e Compare February 8, 2015 18:54
apparently some compilers don't like my previous attempts to generate conditional alloca gcframes
@JeffBezanson
Copy link
Member

I don't think this pattern of use should be supported. You need to initialize julia cleanly before calling jl_apply. The amount of duplicate code here for marking the stack is not a good sign.

@vtjnash
Copy link
Member Author

vtjnash commented Apr 21, 2015

You need to initialize julia cleanly before calling jl_apply

i'm not sure what that means. this patch helps eliminate any dependency on jl_init not being called at a high enough stack location to cover all jl_apply calls.

the code duplication was a bit of an optimization so that non-root tasks didn't need quite as many branches

@JeffBezanson
Copy link
Member

What it means is that I'm perfectly comfortable with having a dependency on jl_init being called higher on the stack than any jl_apply. I don't want to commit to supporting this very questionable use pattern unless it's clear that doing so is important.

@vtjnash
Copy link
Member Author

vtjnash commented Apr 21, 2015

ok

@vtjnash vtjnash closed this Apr 21, 2015
@KristofferC KristofferC deleted the jn/roottask_stackbase branch June 4, 2018 08:32
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