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

Move location of incGlobalClassUnloadID() #21167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpirvu
Copy link
Contributor

@mpirvu mpirvu commented Feb 21, 2025

incGlobalClassUnloadID() function is used to increment a counter every time a class unload event happens. This is used by the interpreter profiler to determine if it needs to re-examine the validity of the entries it looks at. If there was no class unload operation since the last time it looked at an entry, it doesn't have to check again.
Currently, incGlobalClassUnloadID() is called in jitHookAnonClassesUnload() and jitHookClassLoaderUnload(), but we only have to do it once per class unload cycle. This commit moves the location of incGlobalClassUnloadID() to jitHookClassesUnload() which is called only once per class unload cycle.

incGlobalClassUnloadID() function is used to increment a counter
every time a class unload event happens. This is used by the
interpreter profiler to determine if it needs to re-examine the
validity of the entries it looks at. If there was no class unload
operation since the last time it looked at an entry, it doesn't
have to check again.
Currently, incGlobalClassUnloadID() is called in jitHookAnonClassesUnload()
and jitHookClassLoaderUnload(), but we only have to do it once
per class unload cycle. This commit moves the location of
incGlobalClassUnloadID() to jitHookClassesUnload() which is called
only once per class unload cycle.

Signed-off-by: Marius <[email protected]>
@mpirvu mpirvu requested a review from dsouzai as a code owner February 21, 2025 14:37
@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 21, 2025

jenkins test sanity all jdk21

@dsouzai
Copy link
Contributor

dsouzai commented Feb 21, 2025

Given the code in https://github.com/eclipse-openj9/openj9/blob/master/runtime/gc_base/ClassLoaderManager.cpp#L350-L366, is there a risk we won't increment the counter if only say anonymous classes are unloaded?

@dmitripivkine
Copy link
Contributor

Given the code in https://github.com/eclipse-openj9/openj9/blob/master/runtime/gc_base/ClassLoaderManager.cpp#L350-L366, is there a risk we won't increment the counter if only say anonymous classes are unloaded?

classUnloadCount includes anonymousClassUnloadCount, so hook is triggered regardless

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 21, 2025

On alinux64 we have a JITServer test failure:

11:51:15  FAILED: testServerUnreachableForAWhile
11:51:15  java.lang.AssertionError: The process is still alive after waiting for 60000ms.

We tried to destroy the server, but it didn't go away. Strange.
10x grinder just for the failing tests here: https://openj9-jenkins.osuosl.org/job/Grinder/4117/ Passed

For openjdk tests on xlinux we have a failure for jdk_foreign_0

12:22:33  TEST: java/foreign/enablenativeaccess/TestEnableNativeAccessDynamic.java
12:22:33  TEST JDK: /home/jenkins/workspace/Test_openjdk21_j9_sanity.openjdk_x86-64_linux_Personal_testList_0/jdkbinary/j2sdk-image
12:22:33  
12:22:33  ACTION: build -- Error. Agent error: java.lang.Exception: Agent 1 timed out with a timeout of 960 seconds; check console log for any additional details
12:22:33  REASON: User specified action: run build TestEnableNativeAccessDynamic panama_module/* NativeAccessDynamicMain 

A repeat of the failing test here: https://openj9-jenkins.osuosl.org/job/Grinder/4118/ passed

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 24, 2025

Windows failed:

jdk_foreign_1 ==> TEST RESULT: Error. compiler crashed (exit code 4)
jdk_lang_1
jdk_security1_1
jdk_util_1   ==>  TEST RESULT: Error. compiler crashed (exit code 4)
jdk11_tier1_buffer_1 ==> TEST RESULT: Error. compiler crashed (exit code 4)

14:13:51 jdk_lang_1 - Test results: passed: 785; failed: 5; error: 146
14:13:51 Failed test cases:
14:13:51 TEST: java/lang/annotation/typeAnnotations/BadCPIndex.java

14:13:51 jdk_security1_1 - Test results: passed: 215; failed: 1
14:13:51 Failed test cases:
14:13:51 TEST: java/security/PermissionCollection/PermissionCollectionStreamTest.java

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 25, 2025

jenkins test openjdk win64 jdk21

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 25, 2025

jenkins test sanity.openjdk win64 jdk21

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 25, 2025

jenkins test sanity.openjdk win jdk21

@mpirvu
Copy link
Contributor Author

mpirvu commented Feb 26, 2025

All openjdk win64 tests passed on retrial.

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.

3 participants