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 support for stack allocated objects #12205

Closed
wants to merge 2,850 commits into from
Closed

Conversation

carnaval
Copy link
Contributor

Only works with copy_stacks for now. The code is not used anywhere in
codegen right now, it can be tested by using (:stknew typ args...)
instead of :new. It is essentially the GC side of #8134 but without the
global alloca stack & unmarking, so @JeffBezanson will probably be happier.

Stack objects are kept marked (+young) permanently and are only scanned
when coming from the owning task.

Note that this is on top of jn/codegen_rewrite under the "no codegen change policy" :-)

cc @vtjnash

@carnaval
Copy link
Contributor Author

oh and the way I get the current task stack's bounds is kinda gore, I think we have at least the bottom registered somewhere but I didn't feel like going through the whole init thing just yet. I had a look and saw that it looks like we support stacks growing up ?

@yuyichao yuyichao added the GC Garbage collector label Jul 18, 2015
@vtjnash
Copy link
Member

vtjnash commented Jul 18, 2015

I had a look and saw that it looks like we support stacks growing up ?

the code for that is not really functional, since there is no use case for it

oh and the way I get the current task stack's bounds is kinda gore,

take a look at gc_mark_task_stack, either on master or https://github.com/JuliaLang/julia/pull/9461/files#diff-31b93f4272eaeede3738531e90317e0cR1499

the stack is either ta->stkbuf..ta->gcstack..ta->stkbuf + ta->ssize (if it is not the current task), or $rsp..jl_pgcstack..jl_stackbase for the current stack (where you can get $rsp from taking the address of a variable as you enter jl_gc_collect)

@timholy
Copy link
Member

timholy commented Feb 7, 2016

👍 (exciting this would help with #14955). Looks like this could use a rebase now that jn/codegen_rewrite has been merged.

@ViralBShah
Copy link
Member

Would this help for #9174 too?

jiahao and others added 14 commits February 16, 2016 14:49
The font used on ReadTheDocs made the octal examples appear to be
`OO777` or `00777` rather than `0o777`.
Add setindex! for SymTridiagonal, Tridiagonal, and Bidiagonal
Made octal examples easier to read on ReadTheDocs
* Remove the usage of ia_misc.h, (re)define rdtsc
* Fix the usage of __builtin_assume_aligned
* Replace tabs with spaces
when the matrices have the same size we can get away with simple copying of the internal fields.
fixes `%A` formatting (#14409)
MichaelHatherly and others added 18 commits March 1, 2016 09:12
This takes advantage of the simplifications in the previous commit to reduce
the complexity in this script. Outwardly the only difference should be
the formatting of the summary that is displayed and speed (where timings drop
from ~18 to ~9 seconds.)
This commit saves some of the values computed by `doc` and
`summarise` into the generated `MD` object that is returned.
These valus are the `Binding` and signature searched for, as
well as the vector of `DocStr` objects that match the `Binding`
and signature.
Removed mention of current working directory.
Check stride on preallocated output for matmul (fixes #15286)
Ellide immutable allocation in some simple cases
put only values in static parameter environments
Fix type instability in nextprod
- Do not copy a getfield argument if it is already a pointer.
- Mark struct-as-pointer arguments immutable

Should: fix #15274, fix #13305, fix #15277
Set `isapprox` default relative error to be the larger of the default relative errors of each type.
Fix check of inner dimension in matmul for 2x2 and 3x3 outer dimension
Only works with copy_stacks for now. The code is not used anywhere in
codegen right now, it can be tested by using (:stknew typ args...)
instead of :new. It is essentially the GC side of #8134 but without the
global alloca stack & unmarking.

Stack objects are kept marked (+young) permanently and are only scanned
when coming from the owning task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.