Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Expand Miri's BorTag GC to a Provenance GC #118029
Expand Miri's BorTag GC to a Provenance GC #118029
Changes from all commits
0d0a417
0ec82fa
b991658
9ada654
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is it worth thinking about the order in which we check these?
get_alloc_info
checksmemory.alloc_map
first sine I assume that's the most common case.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.
I tuned the order against the test 0weak_memory_consistency, because its runtime explodes after this PR with GC every block. I'll try some other programs.
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.
Looked a bit more into this. I've run (chunks of) the test suites for
regex
,simd-json
, andhttp
and in all these cases > 40% of all the checks for an AllocId result in GlobalAlloc::Memory, but in the 0weak_memory_consistency test, the biggest hit is GlobalAlloc::Function (oddly enough the fraction of hits on functions climbs as the test goes on, not sure why, I'd expect every turn of the loop in that test to be the same).Since all the global allocs can never be deallocated I think it might be worth stealing a bit from
AllocId
so that the Id itself can locally indicate whether the allocation deallocated; that would let us skip over them in the GC without consulting a hash table.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.
So you're saying we should stay with "global first" for now? Works for me.
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.
I had suggested the version without
:
, but with:
also works here.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.
I tried to look up docs for shell expansion and I could only find the ones with :- documented and that's what the Miri repo uses. What changes if the colon is omitted?
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.
I can't find the page I got this from but https://stackoverflow.com/a/16753536 lists them all. They behave differently when the variable exists but is empty.
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.
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html says this before the list that has
:-
etcI'd say the version without the colon is the more reasonable semantics (null != does-not-exist), but the shell world is weird.^^