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

Implement FinalizerEscape #90

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jpsamaroo
Copy link
Collaborator

With the intention of eventually using this to add early finalize calls to minimize GC overhead of functions with many large-but-temporary heap allocations with finalizers.

@jpsamaroo jpsamaroo force-pushed the jps/finalizers branch 3 times, most recently from 4b8b6bf to 0da4802 Compare February 1, 2022 21:10
src/EscapeAnalysis.jl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2022

Codecov Report

Merging #90 (e48ce37) into master (4bd18e1) will decrease coverage by 0.81%.
The diff coverage is 32.14%.

❗ Current head e48ce37 differs from pull request most recent head d687586. Consider uploading reports for the commit d687586 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   80.02%   79.21%   -0.82%     
==========================================
  Files           3        3              
  Lines        1382     1400      +18     
==========================================
+ Hits         1106     1109       +3     
- Misses        276      291      +15     
Impacted Files Coverage Δ
src/EAUtils.jl 43.40% <0.00%> (-0.73%) ⬇️
src/EscapeAnalysis.jl 85.17% <36.00%> (-0.85%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bd18e1...d687586. Read the comment docs.

@@ -126,13 +127,15 @@ struct EscapeInfo
Analyzed::Bool
ReturnEscape::Bool
ThrownEscape::LivenessSet
FinalizerEscape::Bool
Copy link
Owner

Choose a reason for hiding this comment

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

So how FinalizerEscape can be used? If we insert finalize call for allocations whose FinalizerEscape is true, we will end up inserting early finalize calls for anything escaping (since AllEscape also has FinalizerEscape=true.

Copy link
Collaborator Author

@jpsamaroo jpsamaroo Feb 3, 2022

Choose a reason for hiding this comment

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

Should FinalizerEscape=true not be part of AllEscape?

My initial thoughts were that if nothing escaped other than the object being finalized, and the object being finalized does not otherwise escape, then we'd insert finalize at the end of the liveness range.

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.

3 participants