Skip to content
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

Save/load i2c2i adapters #25

Closed
wants to merge 38 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8e41ca2
Refactor SCCache address table setup
ashu-mehra Oct 13, 2024
4f96b30
Allocate address table entries for different types in fixed, independ…
ashu-mehra Oct 13, 2024
0fc149a
save and restore i2c and c2i adapter
ashu-mehra Oct 15, 2024
d5be825
Save AdapterHandlerEntry and AdapterFingerPrint in AOT cache
ashu-mehra Oct 15, 2024
17de7ea
Cleanup stale pointers in TrainingData
ashu-mehra Oct 15, 2024
091626a
Refactor code to lookup adapter code in AOT cache
ashu-mehra Oct 15, 2024
b05860a
Add PerfCounter for tracking time to load adapter table
ashu-mehra Oct 15, 2024
7fe50ae
Add assertion that ArchiveAdapters is set in SCCache::store_adapter
ashu-mehra Oct 17, 2024
fb5b88c
Archive adapter_handler_table to the AOT cache
ashu-mehra Oct 17, 2024
f6a79e3
Remove unused code
ashu-mehra Oct 18, 2024
0f7b7ba
Misc changes
ashu-mehra Oct 21, 2024
ccae838
Improve hashing algorithm for AdapterFingerPrint
ashu-mehra Oct 21, 2024
7db3ea0
Add a helper method to iterate over AdapterFingerPrint
ashu-mehra Oct 21, 2024
16bd0b5
Refactor code to avoid calling AdapterFingerPrint::as_basic_type() when
ashu-mehra Oct 22, 2024
3393d68
Fix a bug and add comment in AdapterHandlerEntry::restore_unshareable…
ashu-mehra Oct 23, 2024
1af4a1e
Fix compile failures
ashu-mehra Oct 23, 2024
268b945
Fix whitespace issues
ashu-mehra Oct 23, 2024
98b0da7
Surround code with INCLUDE_CDS where appropriate
ashu-mehra Oct 23, 2024
ea3d208
Move the check for is_abstract_method_adapter() to correct place
ashu-mehra Oct 23, 2024
04fb256
More whitespace fixes
ashu-mehra Oct 24, 2024
b04ba15
Acquire Compile_lock when writing exception blobs to the SCCache
ashu-mehra Oct 24, 2024
d99c24c
Address reivew comments by vnkozlov
ashu-mehra Nov 12, 2024
59b65ef
Address review comments by iklam
ashu-mehra Nov 12, 2024
9102e3e
Fix the condition to check for code cache full in Method::link_method
ashu-mehra Dec 11, 2024
e999b8d
Merge branch 'premain' into premain-save-i2c2i-v3
ashu-mehra Dec 17, 2024
a5085d8
Fix merge conflict
ashu-mehra Jan 3, 2025
2c1c65c
Avoid adding AdapterHandlerEntry created for comparison to the handler
ashu-mehra Jan 10, 2025
28419f4
Avoid race condition between compiler thread generating exception blob
ashu-mehra Jan 10, 2025
4d9025c
Fix bool condition check
ashu-mehra Jan 10, 2025
efc9774
Fix bug in looking up AdapterFingerPrint in archived table
ashu-mehra Jan 10, 2025
b631d11
Search archived handler table before runtime table when searching a
ashu-mehra Jan 10, 2025
a11da42
Fix compile failure in minimal build config
ashu-mehra Jan 10, 2025
d4d8cf8
Fix whitespace errors
ashu-mehra Jan 10, 2025
56c98bb
Mark entry point as RuntimeAddress for relocation
ashu-mehra Jan 27, 2025
5df7a30
Merge branch 'premain' into premain-save-i2c2i-v3
ashu-mehra Jan 27, 2025
483a165
Do not search archived adapter table during assembly phase
ashu-mehra Jan 28, 2025
4e674eb
Fix compile failure in minimal build
ashu-mehra Jan 28, 2025
b991791
Merge branch 'premain' into premain-save-i2c2i-v3
ashu-mehra Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/hotspot/share/code/SCCache.cpp
Original file line number Diff line number Diff line change
@@ -2367,10 +2367,8 @@ bool SCCache::store_adapter(CodeBuffer* buffer, uint32_t id, const char* name, u
buffer->decode();
}
#endif
// we need to take a lock to stop C1 and C2 compiler threads racing to
// we need to take a lock to stop main thread racing with C1 and C2 compiler threads to
// write blobs in parallel with each other or with later nmethods
// TODO - maybe move this up to selected callers so we only lock
// when saving a c1 or opto blob
MutexLocker ml(Compile_lock);
if (!cache->align_write()) {
return false;
@@ -2483,6 +2481,11 @@ bool SCCache::store_exception_blob(CodeBuffer* buffer, int pc_offset) {
buffer->decode();
}
#endif
// we need to take a lock to stop C1 and C2 compiler threads racing to
// write blobs in parallel with each other or with later nmethods
// TODO - maybe move this up to selected callers so we only lock
// when saving a c1 or opto blob
MutexLocker ml(Compile_lock);
if (!cache->align_write()) {
return false;
}