-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[WIP] Parallel garbage collector #5362
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
Open
petermz
wants to merge
137
commits into
oracle:master
Choose a base branch
from
petermz:parallel-gc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
137 commits
Select commit
Hold shift + click to select a range
1533d7b
Noop thread using volatile flags and busy wait
petermz 6195b82
Noop thread with safepoints and synchronization
petermz 3dfd353
OldGeneration.scanGreyObjects() runs on worker thread (but logging cr…
petermz ce6b153
Worker thread synchronizing via a queue, never put on safepoint
petermz 674df60
Two parallel workers synchronizing via queue
petermz ae4f77f
`releaseSpaces` stage working on 2 background threads
petermz 7db5c49
Added a custom Timer to HeapImpl
petermz aef1e38
Parallel `dirtyCardIfNecessary`
petermz 54683ec
Parallel objRef update
petermz 2bfc96e
Passing `original` object safely via Pointer
petermz 7d69248
`installFwPtr` works but not on workers
petermz f036854
`installForwardingPointer` works on parallel threads
petermz b8dd7c8
`enableRememberedSetForObject` works in parallel
petermz ac78015
Protect against promoting an object twice.
petermz d8b11d0
Uninlined several methods
petermz 0820d8d
Parallel memory allocation in to-space.
petermz 980155b
Better sync strategy in `HeapChunk.walkObjectsFromInline`
petermz 66aa7fc
Simplified parallel invocation, assuming complete gc, innerOffset=0, …
petermz d526393
Restored call to `Space.promoteAlignedObject()`
petermz 3bf93c0
Restored call to `GCImpl.promoteObject()`
petermz 1b15e01
Restored call to `GreyToBlackObjRefVisitor.visitObjectReferenceInline()`
petermz 043da38
Extended TaskQueue to 1024 task items
petermz 0d936b0
Put objects on the queue rather than refs
petermz d47b6d2
Don't put G2BObjectVisitor instances on TaskQueue
petermz 239c849
Added max queue size statistic
petermz e04d49a
Made TaskQueue private in ParallelGCImpl
petermz 6b692e2
Queue grey objects instead of scanning chunks
petermz 69bbd0d
Queue unaligned objects for parallel scan
petermz 23b19ac
TaskQueue fixes: `drain` and `idleCount`
petermz 57e8275
Made TaskQueue reference-free
petermz c0129b4
Protect `GCImpl.promoteObject` with critical section
petermz ff66f18
Fixed `TaskQueue.waitUntilIdle`
petermz af6f70b
Removed locking on fromSpace
petermz 972002c
`scanGreyObjects` cleanup
petermz b6c5168
Added `ParallelGCImpl.checkThrowable`
petermz 2295b15
Increased queue size for HyperAlloc
petermz 81c02c7
Forwarding pointers done right + VerifyHeap hack
petermz db7c057
Protected chunk promotion with mutex
petermz 57d2372
Cleanup
petermz e376e13
Handle queue overflow by executing tasks synchronously
petermz 1c891d1
Cleanup
petermz 7b880b6
Added thread local Stats
petermz cdf4815
(Incomplete) CAS based queue with minimal synchronization.
petermz 71c515a
Thread local memory allocation
petermz 1d2f791
Retract speculatively allocated memory
petermz 17c695b
Thread local task stacks
petermz d9a47b7
Post merge cleanup
petermz ef9c35f
Introduced `UseParallelGC` option
petermz 4c77aa3
Removed some static state from ParallelGCImpl
petermz 3d6b797
Replaced `Space.mutex` with `ParallelGCImpl.mutex`
petermz 4a3c01c
Cleanup: removed Stats printout
petermz d99ca0f
Enqueue objects as they are copied
petermz e29e81d
Cleanup
petermz e068f43
Fixed hangup; better worker thread management
petermz e67370c
Reuse GC thread as one of the workers
petermz 8e33c3d
Determine number of workers at runtime
petermz 73177bd
Shared synchronized buffer, so far holds object pointers
petermz 060bbd4
Use buffer for aligned chunks instead of objects
petermz f0a26b7
Support for unaligned chunks
petermz ec5dd99
HyperAlloc works but load is badly unbalanced
petermz d59cb36
Report stats for relevant threads only
petermz c4c4b34
Fixed SerialGC compilation
petermz c061049
Cleanup
petermz 1dbd6c1
Determine buffer size at runtime
petermz ca5edac
Removed Stats
petermz 757075f
Cleanup
petermz 01627fc
Fixed crash due to unscanned chunks
petermz 80df70e
Added copyright notices
petermz b9fed22
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz 2a540d3
Fixed merge errors
petermz f228f74
Fixed Substrate options to work with ParallelGC
petermz 3cbe52e
Post-review renaming and cleanup
petermz c8ae8a3
Review: forwarding header installation was not atomic enough
petermz 1a22815
Worker thread shutdown
petermz 00a8f37
Made `ChunkBuffer` grow as needed and free memory in the end
petermz 2af8a30
More robust worker thread routine
petermz b849c4a
Thread safe Reference handling
petermz 14c2047
Made SerialGC options work with ParallelGC
petermz 271134d
Enabled incremental collections
petermz bced7d1
Use try-finally for mutex locking
petermz 165a8dc
Added assertion to `ParallelGCImpl.getScannedChunk()`
petermz 8ec4ce9
Wait for workers to be blocked before starting parallel phase
petermz 93bfef8
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz e4ec854
Don't retire scanned allocation chunks
petermz 793deff
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz dd32219
Merged ParallelGC and ParallelGCImpl
petermz d9f38f3
Introduced special SafepointBehavior for worker threads
petermz ec3b2a5
Style fixes
petermz 1462c2f
Fall back to serial GC if collection occurs before worker threads hav…
petermz df09255
Style fixes
petermz 7086973
Merge with master.
christianhaeubl 34ad44d
Fix after rebasing to master.
christianhaeubl 35325d6
Make the inner-most part of the GC uninterruptible.
christianhaeubl 5b16c29
Use unattached threads as GC worker threads.
christianhaeubl f432220
Cleanup and assertion fixes
petermz 22d9dc5
Addressed minor review comments
petermz 43b944d
Adapted to IdentityHash changes
petermz c824b1b
Worker thread shutdown routine
petermz 13557ba
Merge remote-tracking branch 'upstream/master' into parallel-gc
petermz 5954d36
Report OOME on main GC thread only
petermz cf486e6
Added javadoc for ParallelGC
petermz d31e9d7
Workaround for @Uninterruptible visitors
petermz 65e7ad2
Fixed crash due to chunk space being null
petermz 3579f90
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz 4f6b3f6
Merge with master.
christianhaeubl 5b47410
Fix object forwarding.
christianhaeubl 7c1aa13
Use at most 8 worker threads
petermz c87e357
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz 5a820e0
Merge with master.
christianhaeubl 91eec09
Cleanups.
christianhaeubl cc7b107
Fix counter initialization.
christianhaeubl c4957c6
Fix an overflow.
christianhaeubl ad940e9
Fix a race that could result in an incorrect remembered set.
christianhaeubl b338cb3
Support unattached threads in VMError.shouldNotReachHere().
christianhaeubl c698f80
Various cleanups and fixes for the parallel GC.
christianhaeubl 2e11172
Throw an error if the parallel GC is used on other platforms than Lin…
christianhaeubl 24051eb
Style fix.
christianhaeubl 6ea15c5
Verify that SpawnIsolates is enabled if the ParallelGC is used.
christianhaeubl 101726a
Fix parallel GC teardown.
christianhaeubl 393bb27
Fix identity hashcode computation.
christianhaeubl 657f774
Fix validation of UseParallelGC option.
christianhaeubl 91e3177
Avoid that unattached threads are interpreted as the error handling t…
christianhaeubl 35013d3
Skip the parallel GC phase if there isn't any work.
christianhaeubl 31bb51d
Cleanups.
christianhaeubl 0c55642
Fixed race in reference processing
petermz 383484a
Fixed racy assertion in GreyToBlackObjRefVisitor
petermz c5190e1
Merge branch 'master' of github.com:oracle/graal into parallel-gc
petermz 1e02a09
Fixed assertion that broke SerialGC
petermz e520318
Merge with master.
christianhaeubl c38406c
Added some documentation.
christianhaeubl 59c56b0
Fixed some races
petermz 73f0b54
Merge with master.
christianhaeubl e43b3e9
Fix an issue where the parallel GC could destroy the array length.
christianhaeubl 80f27d4
Fix the object size used in retractAllocation().
christianhaeubl 2047127
Support the parallel GC on Windows.
christianhaeubl 9710da3
Enable RememberedSet before promoting unaligned chunk
petermz 3e57bab
Log number of worker threads
petermz 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
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
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
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.
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.