-
Notifications
You must be signed in to change notification settings - Fork 62
8263018: Improve API for lifecycle of native resources #466
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
Closed
mcimadamore
wants to merge
96
commits into
openjdk:foreign-memaccess+abi
from
mcimadamore:resourceScope
Closed
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
85b1246
Initial (hacky) pass.
mcimadamore 0d52da8
Cleanup VaList implementation
mcimadamore 911d739
Fix benchmarks
mcimadamore 9c8799a
All tests pass
mcimadamore b0790bd
Cleanup scope logic - pull resource list into its own abstraction
mcimadamore 5628993
Add NativeAllocator API.
mcimadamore f2f6946
Add initial implementation of ResourceScope::fork
mcimadamore 87cfd70
Improve implementation of NativeScope
mcimadamore e71a193
Remove access modes
mcimadamore a46a480
Add biggie test for ResourceScope::fork
mcimadamore 7757c10
Switch default for MemorySegment::allocateNative to be cleaner-enabled.
mcimadamore 5dba87d
Simplify implementation of LibrariesHelper to use ResourceScope
mcimadamore 1a4a8ef
Add support for non-closeable ResourceScopes
mcimadamore 7ba07cc
First stab at javadoc
mcimadamore 77de618
Flip defaults for short native/mapped segment factories.
mcimadamore 63fef62
Fix NPE assertions on ResourceScope
mcimadamore 2773f15
Fix MemoryScope javadoc
mcimadamore 9a2e417
Tweak more defaults - now short segment factories return shared, non-…
mcimadamore 443e166
Simplify implementation for VaList::read
mcimadamore 16b1032
Clarify implementation of valists, by accepting a single scope.
mcimadamore 7dc2e93
Remove ad-hoc liveness check segment from Windows VaList impl
mcimadamore cd89bc3
Simplify VaList API.
mcimadamore 8b512df
Tweak benchmark after VaList changes
mcimadamore 980544d
Add implementations for recycling/malloc/arena allocators.
mcimadamore 1a033e8
Split ResourceScope.fork() into lock() and addOnClose().
mcimadamore 97a60c9
Do not call cleanup action if addOnClose fails because of closed scope
mcimadamore 475eb13
Simplify MemoryScope implementation
mcimadamore 4e9a06f
Add extra documentation on MemoryScope
mcimadamore 525ebbc
Fix javadoc
mcimadamore 145b122
Remove spurious debug print statement
mcimadamore ae9a8e4
Minor javadoc tweaks
mcimadamore a0e9151
Fix javadoc of ResourceScope::close
mcimadamore 689c94b
Another javadoc fix
mcimadamore fb226da
Tweak API for recycling allocator.
mcimadamore 2847f8b
Centralize testing for all scoped entities
mcimadamore 87d12dc
Generalize NativeAllocator to cover heap segments too (->SegmentAlloc…
mcimadamore 2aaf78b
* Remove SharedUtils.Allocator
mcimadamore da936ac
Add SegmentAllocator support to CLinker
mcimadamore cb762d7
Enhance and fix the CallOverhead benchmark:
mcimadamore c96fd3d
Merge branch 'foreign-memaccess+abi' into resourceScope
mcimadamore bbccc3a
Fix most test failures
mcimadamore 2fb8a8f
ALl tests pass
mcimadamore db0220f
Fix adaptation type comments
mcimadamore 8e564e5
Add benchmark for strlen with recyclig scope
mcimadamore 16cec3f
Tweak logic by which CLinker adds a SegmentAllocator argument
mcimadamore 14d4956
Updated CLinker javadoc
mcimadamore 2b584e4
Rename allocator factories, and add a factory which takes a scope.
mcimadamore 9d60bd9
Fix javadoc in SegmentAllocator
mcimadamore 35968a7
Remove linker implementation dependencies on NativeScope
mcimadamore 0c37bf3
Fix javadoc issue in CLinker
mcimadamore 3af1f54
Remove NativeScope
mcimadamore 8b2894b
Clarify javadoc of ResourceScope::Lock
mcimadamore 941edbc
Simplify arena allocators
mcimadamore 04de173
Add useful overloads in CLinker:
mcimadamore a0a9dc7
Fix benchmark for implicit deallocation
mcimadamore 9fa07a7
Simplify ResourceScope API by removing closeable bit.
mcimadamore 67e1831
Merge branch 'foreign-memaccess+abi' into resourceScope
mcimadamore 3f7b263
Fix some issues in upcall handler (Jorn)
mcimadamore ceb0774
Fix Windows VaList to add eager scope check on creation/copy
mcimadamore 91e2794
Fix issues with GC cleaned upcall
mcimadamore 167e25f
Fix TestResourceScope
mcimadamore fec4b65
Add overload for restricted VaList factory which takes a scope
mcimadamore 321b389
Remove comments from TestDowncall
mcimadamore 91ed099
Add assertion when functions are void
mcimadamore 16f983a
Slightly clarify ProgrammableInvoker::specialize
mcimadamore 092eca2
Fix javadoc
mcimadamore 3e1399b
Rename ResourceScope::Lock
mcimadamore bf0ee80
Fix whitespaces
mcimadamore d04ee60
Fix issue in ResourceScope::ofShared() javadoc
mcimadamore 5db5e3b
Address javadoc issues in review comments
mcimadamore df7eb2b
Address more review comments on MemoryScope/ResourceList
mcimadamore 472b214
Address more review comments (VaList/SharedUtils/tests)
mcimadamore 9d1ba85
Revert changes to SharedUtils::adaptDowncall
mcimadamore 6328866
Cleanup SharedUtils::wrapWithAllocator and Binding.Context
mcimadamore 69c084f
Improve arena allocator implementation:
mcimadamore 924f8e5
Refactor MemoryScope and ResourceList hierarchies
mcimadamore 465df11
Clarify javadoc for SegmentAllocator::arenaUnbounded
mcimadamore 5710a35
Remove spurious println
mcimadamore d2c6b68
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 65e5d63
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 8335568
Update src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/A…
mcimadamore f3741fc
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 81c4d9b
Update src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/C…
mcimadamore b5bdc61
Update src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/C…
mcimadamore 285644a
Update src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/C…
mcimadamore 9c5af18
Address review comments
mcimadamore c19b04a
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 5592426
Merge branch 'resourceScope' of https://github.com/mcimadamore/panama…
mcimadamore 8545160
Address rest of review comments from Paul
mcimadamore 195ba0f
Fix javadoc of SegmentAllocator
mcimadamore d02e86f
Add ResourceScope overloads in CLinker
mcimadamore 0ea68e1
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 697d179
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 15431e7
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 79dde96
Update src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/…
mcimadamore 5de033e
* More javadoc fixes
mcimadamore 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
292 changes: 185 additions & 107 deletions
292
src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java
Large diffs are not rendered by default.
Oops, something went wrong.
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.