-
Notifications
You must be signed in to change notification settings - Fork 435
Give ParparVM real weak and soft references #5732
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
24517c5
Give ParparVM real weak and soft references
shai-almog 8a28f0e
Make reference field access atomic, and decide aliases together
shai-almog b5f53d8
Release soft referents on allocation failure, and stop losing touches
shai-almog d012f91
Retain a referent discovery could not record, and load it once
shai-almog 67b1bdf
Process references to a fixpoint, and register the get() barrier
shai-almog 4cc739b
Let the emergency clear soft referents without the discovery list
shai-almog 67f8b86
Hold the SATB registration across the referent load
shai-almog b343356
Finish the referent's atomic accesses, and stop clearing after a drop…
shai-almog aa8cdaf
Count take-side SATB losses, and stop clearing when SATB is compiled out
shai-almog 99504d0
Stop the verifier being blind to referents, and close a heap overflow
shai-almog be618fc
Retain discovered referents when a dropped log abandons the clear pass
shai-almog 8bffa85
Measure what the Reference.get() load barrier actually costs
shai-almog 00c02d4
Close the remaining reference-clearing races, and fix the no-BiBOP build
shai-almog a12f741
Define the GC epoch mirror unconditionally instead of working around it
shai-almog c27e1e7
Serialize emergency recovery slots, and stop the epoch mirror going s…
shai-almog d4bbc9b
Retain rather than clear on the capped SATB termination path
shai-almog 653713d
Recover references when the final SATB take loses its batch
shai-almog ffb8d6f
Re-arm the SATB barrier before tracing recovered referents
shai-almog ba514a7
Track emergency slots when deciding the retain fixpoint
shai-almog 79a2b66
Consume the touch stamp when the emergency path retains an unrecorded…
shai-almog 9dccb84
Export SoftReference to the supported API, and retain under the barri…
shai-almog 3065b6a
Resolve unrecorded referents before reading them, and stop self-test3…
shai-almog a64e25a
Delete the duplicated retain walk, and make the self-test rebuild fai…
shai-almog a41b4a4
Let drop recovery reclaim what the emergency condemned, and delete th…
shai-almog 4c0292a
Quiesce before reading touch stamps in drop recovery, and spare live …
shai-almog a11dae2
Guard the recovery's header read, and record what it clears
shai-almog 6d3cf63
Do no reference work in a program that has no references
shai-almog 1c8ab03
Nursery promotion, two silent gates, and a baseline the rename broke
shai-almog 7385cc9
The emergency reclaim retained everything it condemned
shai-almog 8d59483
Record why the porting layer still hands back a WeakReference
shai-almog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Copyright (c) 2012, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package java.lang.ref; | ||
| /// A reference the collector keeps while the referent is being used and memory allows, and | ||
| /// clears before the process runs out. | ||
| /// | ||
| /// This directory is the SUPPORTED API SURFACE, not an implementation: `maven/java-runtime` | ||
| /// compiles it and `BytecodeComplianceMojo` indexes the result as the set of types an | ||
| /// application is allowed to touch. A class implemented in `vm/JavaAPI` but missing here is | ||
| /// therefore invisible to user code -- javac resolves it against the host JDK and the | ||
| /// compliance check then rejects it as forbidden API, which is a confusing way to learn a | ||
| /// feature was never exported. The bodies are deliberately inert for the same reason the | ||
| /// neighbouring stubs are. | ||
| public class SoftReference extends java.lang.ref.Reference{ | ||
| /// Creates a new soft reference that refers to the given object. | ||
| public SoftReference(java.lang.Object ref){ | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.