Skip to content

Avoid locking the CHTable at end of compilation if possible - #14050

Merged
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:aotchtable
Dec 1, 2021
Merged

Avoid locking the CHTable at end of compilation if possible#14050
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:aotchtable

Conversation

@mpirvu

@mpirvu mpirvu commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

At the end of compilation the JIT acquires the VM class mutex
just before performing chtable.commit(). We can skip this lock acquire
operation if we test beforehand that a chtable.commit does not need
to be performed. This can speed up AOT loads and some JIT compilations,
because they don't have to wait for the VM class mutex.
Contention on the VM class mutex has been shown to be very heavy
in very large applications that load very many classes.

Partially addresses issue #13807

Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com

@mpirvu mpirvu added the comp:jit label Dec 1, 2021
@mpirvu

mpirvu commented Dec 1, 2021

Copy link
Copy Markdown
Contributor Author

@dsouzai Please review/merge this PR. Thanks!

@mpirvu
mpirvu requested a review from dsouzai December 1, 2021 15:44

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm; minor change requested.

Comment thread runtime/compiler/env/CHTable.cpp Outdated
At the end of compilation the JIT acquires the VM class mutex
just before performing chtable.commit(). We can skip this lock acquire
operation if we test beforehand that a chtable.commit does not need
to be performed. This can speed up AOT loads and some JIT compilations,
because they don't have to wait for the VM class mutex.
Contention on the VM class mutex has been shown to be very heavy
in very large applications that load very many classes.

Partially addresses issue eclipse-openj9#13807

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
@dsouzai

dsouzai commented Dec 1, 2021

Copy link
Copy Markdown
Contributor

jenkins test sanity.functional all jdk17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants