8383262: Implement optimized aarch64_get_thread_helper() for Windows/AArch64#605
8383262: Implement optimized aarch64_get_thread_helper() for Windows/AArch64#605raneashay wants to merge 1 commit into
aarch64_get_thread_helper() for Windows/AArch64#605Conversation
|
👋 Welcome back arane! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
aarch64_get_thread_helper() for Windows/AArch64
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/approval request Several AOT tests fail without this patch because the MSVC compiler applies an optimization called Identical COMDAT Folding (ICF) that results in both |
|
@raneashay |
|
Hi @raneashay When was this bug introduced? Is it caused by a new compiler that implements the optimization you mention? How did you test? |
Where is this assertion? |
| char* tls_block = (char*)tls_array[_tls_index]; | ||
|
|
||
| // Compute the offset of Thread::_thr_current within this module's TLS | ||
| // block. Unlike ELF, which provides `tlsdesc` relocations that lets |
There was a problem hiding this comment.
| // block. Unlike ELF, which provides `tlsdesc` relocations that lets | |
| // block. Unlike ELF, which provides `tlsdesc` relocations that let |
Required not just for the performance optimization from the patch but also because without this patch, several AOT tests fail:
The reason for the AOT tests failing without this patch is that without this patch, the MSVC compiler applies an optimization called Identical COMDAT Folding (ICF) that results in both
Thread::current()andaarch64_get_thread_helper()being mapped to the same address (since before this patch,aarch64_get_thread_helper()simply calledThread::current()). In FastDebug builds, this results in the assertion failure_hash_table->get(addr) == nullptr. In Release builds, since assertions are dropped, the duplicate insert silently overwrites the table entry, so Release builds don't see the test failure. Slow debug builds also don't see test failures because in slo debug builds, MSVC does not apply ICF.Patch applies cleanly from JDK tip.
Progress
Issue
aarch64_get_thread_helper()for Windows/AArch64 (Enhancement - P4 - Requested)Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/605/head:pull/605$ git checkout pull/605Update a local copy of the PR:
$ git checkout pull/605$ git pull https://git.openjdk.org/jdk25u-dev.git pull/605/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 605View PR using the GUI difftool:
$ git pr show -t 605Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/605.diff
Using Webrev
Link to Webrev Comment