The title pretty much says it all - what are these self healing barriers and why are they important in Shenandoah 2.0?
Shenandoah self healing barriers
129 Views Asked by Eugene At
1
There are 1 best solutions below
Related Questions in JAVA
- ios responsive design not working (too wide in portrait orientation)
- Angular scroll directive
- Responsive Jquery function not working when window resize
- Mobile CSS only loading after device rotates
- Turn this slider really responsive
- How to show image caption in ionicframework?
- Control BX Slider from outside of function
- Breakpoints Not Applying Float Rule After Resize
- Responsive Web Page Scrolling Glitch On iOS
- CSS way of looping a background image with cover or contain sizing
Related Questions in GARBAGE-COLLECTION
- ios responsive design not working (too wide in portrait orientation)
- Angular scroll directive
- Responsive Jquery function not working when window resize
- Mobile CSS only loading after device rotates
- Turn this slider really responsive
- How to show image caption in ionicframework?
- Control BX Slider from outside of function
- Breakpoints Not Applying Float Rule After Resize
- Responsive Web Page Scrolling Glitch On iOS
- CSS way of looping a background image with cover or contain sizing
Related Questions in JVM
- ios responsive design not working (too wide in portrait orientation)
- Angular scroll directive
- Responsive Jquery function not working when window resize
- Mobile CSS only loading after device rotates
- Turn this slider really responsive
- How to show image caption in ionicframework?
- Control BX Slider from outside of function
- Breakpoints Not Applying Float Rule After Resize
- Responsive Web Page Scrolling Glitch On iOS
- CSS way of looping a background image with cover or contain sizing
Related Questions in SHENANDOAH
- ios responsive design not working (too wide in portrait orientation)
- Angular scroll directive
- Responsive Jquery function not working when window resize
- Mobile CSS only loading after device rotates
- Turn this slider really responsive
- How to show image caption in ionicframework?
- Control BX Slider from outside of function
- Breakpoints Not Applying Float Rule After Resize
- Responsive Web Page Scrolling Glitch On iOS
- CSS way of looping a background image with cover or contain sizing
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This explanation will piggy-back on the first part and the second part of some answers I tried to put around
Shenandoah 2.0.To really answer this question we need to look at how the
load reference barrieris implemented and how aGC cycleacts, in general.When a certain
GC cycleis triggered, it first chooses the regions with the most garbage; i.e.: objects that are in the collection set are very few (this will matter in the future). The simplest way to understand this topic is via an example. Suppose this is a scheme that now exists in a certain region:There is an object that exists in the region and there are two references pointing to it :
refAandrefB.GCkicks in and this region is chosen to be garbage collected. At the same time there are active threads in the application that try to access this Object viarefAandrefB. Since this object isaliveat some point it needs to be evacuated to a new region (part of themark-compactphase).So:
GCis active and, at the same time, we read viarefA/refB. When we do this reading we step on theload-reference-barrier, implemented here. Notice how internally it has some "filters" (via a bunch ofif/elsestatements). Specifically:it checks if "evacuation is currently in progress". This is done via a thread local flag that is set when evacuation first starts. Let's suppose the answer to this is : yes.
it checks if the object that we are currently operating on is in the "collection-set". This means it is currently marked as alive. Let's suppose this is "yes" also.
the last check is to find out if this object was already "copied" to a different region (it was evacuated). Let's suppose the answer to this is "no", i.e. :
obj == fwd.At this point in time, a few things happen. First a copy is created and
markbecomes forwardeeOnly later in the code, would
refAandrefBbe updated to point to the new (copied) object. But that means an interesting thing. It means that untilrefAandrefBare actually made to point to the new object, the object that they currently point, is in the "collection set". So, if GC is active and even if theforwardeehas been established, theload-reference-barrierstill needs to do some work.So the very smart people behind
Shenandoahsaid this : why not update the references there, immediately after theforwardeehas been established (or when theforwardeeis already known for other references)? And this is exactly what they did.Let's suppose we get back to our initial drawing:
And again, we "enable" all of the filter:
there is a Thread that reads via
refAGC is active
the object behind
refAandrefBis alive.This is what will happen with "self healing barriers":
The difference is obvious:
refAwas moved to point to the new Object viaCAS, on the spot. If there is going to be a read again viarefA(GC is still active), this will result in a much faster load-reference-barrier execution. Why? becauserefApoints to an object that is not in the "collection set".But this also means that if we read via
refBand see thatfwd != obj- the code can do the same trick and update therefBin place, at the time the first read happened viarefB.This improves performance according to the people familiar with the matter, and I trust them.