Skip to content

Enable balanced GC modes in playlists for Jenkins - #22700

Merged
llxia merged 5 commits into
eclipse-openj9:masterfrom
annaibm:enableBalan
Oct 6, 2025
Merged

Enable balanced GC modes in playlists for Jenkins#22700
llxia merged 5 commits into
eclipse-openj9:masterfrom
annaibm:enableBalan

Conversation

@annaibm

@annaibm annaibm commented Sep 30, 2025

Copy link
Copy Markdown
Contributor
  • Enable functional tests to run on balanced GC modes for Jenkins

related:https://github.ibm.com/runtimes/automation/issues/125

@annaibm

annaibm commented Sep 30, 2025

Copy link
Copy Markdown
Contributor Author

@annaibm
annaibm marked this pull request as draft September 30, 2025 17:05
<variations>
<variation>Mode110</variation>
<variation>Mode610</variation>
<variation>Mode500</variation>

@llxia llxia Sep 30, 2025

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.

The ideal is to find the equivalent balanced mode.

Mode500 is -Xint -Xgcpolicy:balanced -Xnocompressedrefs. We should not use -Xint unless the test is specifically testing -Xint.

In this case, we should set Mode501 and Mode551.

https://github.com/adoptium/TKG/blob/c0fd937c76392ba409c11608c1308e6d1c89b8af/resources/modes.xml#L3188
https://github.com/adoptium/TKG/blob/c0fd937c76392ba409c11608c1308e6d1c89b8af/resources/modes.xml#L3348

We need to evaluate on a case-by-case basis.

<variation>Mode610</variation>
<variation>Mode500</variation>
<variation>Mode501</variation>
<variation>Mode551</variation>

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.

I think we need Mode550

@annaibm

annaibm commented Sep 30, 2025

Copy link
Copy Markdown
Contributor Author

Grinder tests:
testList TESTLIST=cmdLineTester_modularityddrtests11
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55173/ — > passed ✅

testList TESTLIST=TestGCClassWithStaticRetransformInGencon_SE80
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55179/ —> passed ✅

testList TESTLIST=testSCCMLTests1
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55175/ —> passed ✅

testList TESTLIST=cmdLineTester_jvmtitests_Java11andUp,testSCCMLTests1_openj9,testSCCMLTests3,testSCCMLTests6
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55178/ —> Not passed ❌

testList TESTLIST=xlpCodeCacheTests
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55182/ —> passed ✅

testList TESTLIST=cmdLineTester_jython_7,xlpCMLTests,xlpCodeCacheTests,cmdLineTester_classesdbgddrext,cmdLineTester_classesdbgddrext_aix,cmdLineTester_LazyClassLoading,cmdLineTester_modularityddrtests17,cmdLineTester_DataHelperTests,testSCCMLListALLCaches,testSCCMLExpireAndListALLCaches,testSCCMLTests2,testSCCMLTests4,testSCCMLTests5,testSCCMLSnapshot,testSCCMLSoftmx

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55171/ —> passed ✅

@annaibm

annaibm commented Sep 30, 2025

Copy link
Copy Markdown
Contributor Author

Hi @dmitripivkine
I’m seeing a failure for the following tests when enabling them with balanced mode:

  • cmdLineTester_jvmtitests_Java11andUp_4
  • testSCCMLTests6

Modes used:

  • 501 → -Xjit -Xgcpolicy:balanced -Xnocompressedrefs
  • 551 → -Xjit -Xgcpolicy:balanced -XX:+UseCompressedOops

Grinder run: 55178

Error:

[ERR]  Error: 68   JVMTI_ERROR_UNSUPPORTED_VERSION
[ERR]   can_generate_sampled_object_alloc_events should be available in onload phase
[ERR]   Location: soae001.c -> [soae001():54]
[ERR] JVMJ9TI064E Agent initialization function Agent_OnLoad failed for library jvmtitest, return code -1
[ERR] JVMJ9VM015W Initialization error for library j9jvmti29(-3): JVMJ9VM009E J9VMDllMain failed
[ERR] JVMJ9VM009E J9VMDllMain failed
>> Success condition was not found: [Return code: 0]

Could you please take a look?

@dmitripivkine

Copy link
Copy Markdown
Contributor

At the moment JVMTI Capability can_generate_sampled_object_alloc_events is disabled for Balanced and Metronome.
I think we should investigate the reason. Meanwhile I think we should exclude this test.

#if JAVA_SPEC_VERSION >= 11
	if (isEventHookable(j9env, JVMTI_EVENT_SAMPLED_OBJECT_ALLOC)
		&& (J9_GC_POLICY_METRONOME != vm->gcPolicy)
		&& (J9_GC_POLICY_BALANCED != vm->gcPolicy)
	) {
		rv_capabilities.can_generate_sampled_object_alloc_events = 1;
	}
#endif /* JAVA_SPEC_VERSION >= 11 */

@annaibm

annaibm commented Oct 1, 2025

Copy link
Copy Markdown
Contributor Author

Grinder run after excluding tests:cmdLineTester_jvmtitests_Java11andUp
testSCCMLTests6

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55195/ passed ✅

@annaibm
annaibm force-pushed the enableBalan branch 2 times, most recently from c98b9c7 to 1877efe Compare October 1, 2025 15:47
@annaibm
annaibm requested a review from llxia October 1, 2025 15:48
@annaibm
annaibm marked this pull request as ready for review October 1, 2025 15:48
@llxia

llxia commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

If the test runs on IBM Java 8, it will run in vmfarm. Please also launch vmfarm testing to verify the changes. Thanks

@dmitripivkine

Copy link
Copy Markdown
Contributor

@annaibm Would you please run test cmdLineTester_jvmtitests_Java11andUp with Balanced with my personal build, sdk link?
Looks like there is no need to disable can_generate_sampled_object_alloc_events for Balanced, it should be supported.

@annaibm

annaibm commented Oct 1, 2025

Copy link
Copy Markdown
Contributor Author

re #22700 (comment)
Ran cmdLineTester_jvmtitests_Java11andUp with Balanced against your personal build. Please find the Grinder link below
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55207/console ✅ passed

@dmitripivkine

Copy link
Copy Markdown
Contributor

re #22700 (comment) Ran cmdLineTester_jvmtitests_Java11andUp with Balanced against your personal build. Please find the Grinder link below https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55207/console ✅ passed

Thank you!
I have created PR to enable capability for Balanced.
Once tested, approved and merged test can be re-enabled.

@annaibm

annaibm commented Oct 1, 2025

Copy link
Copy Markdown
Contributor Author

Thank you @dmitripivkine
One question — the following test testSCCMLTests6 is still failing against your personal build:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55209/console

Should this test remain excluded for now? If it does need to stay excluded, could you please provide the issue link so I can add it into the exclude tag?

@dmitripivkine

Copy link
Copy Markdown
Contributor

Thank you @dmitripivkine One question — the following test testSCCMLTests6 is still failing against your personal build: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55209/console

Should this test remain excluded for now? If it does need to stay excluded, could you please provide the issue link so I can add it into the exclude tag?

There is example of the failure:

15:49:58  Testing: Test 208-h: Make sure new startup hints are stored into the cache
15:49:58  Test start time: 2025/10/01 12:49:58 Pacific Standard Time
15:49:58  Running command: "/home/jenkins/workspace/Grinder/jdkbinary/j2sdk-image/bin/java"  -Xjit -Xgcpolicy:balanced -Xnocompressedrefs  -Xshareclasses:name=ShareClassesCMLTests,printStats=startuphint
15:49:58  Time spent starting: 4 milliseconds
15:49:58  Time spent executing: 130 milliseconds
15:49:58  Test result: FAILED
15:49:59   [ERR] 
15:49:59   [ERR] Current statistics for cache "ShareClassesCMLTests": 
15:49:59   [ERR] 
15:49:59   [ERR] Cache created with:
15:49:59   [ERR] 	-Xnolinenumbers                      = false
15:49:59   [ERR] 	BCI Enabled                          = true
15:49:59   [ERR] 	Restrict Classpaths                  = false
15:49:59   [ERR] 	Feature                              = non-cr
15:49:59   [ERR] 	Processor Features                   = null
15:49:59   [ERR] 
15:49:59   [ERR] Cache contains only classes with line numbers
15:49:59   [ERR] 
15:49:59   [ERR] base address                         = 0x00007F9B21459000
15:49:59   [ERR] end address                          = 0x00007F9B34000000
15:49:59   [ERR] allocation pointer                   = 0x00007F9B2172C158
15:49:59   [ERR] 
15:49:59   [ERR] cache layer                          = 0
15:49:59   [ERR] cache size                           = 314572192
15:49:59   [ERR] softmx bytes                         = 67108864
15:49:59   [ERR] free bytes                           = 63047918
15:49:59   [ERR] Reserved space for AOT bytes         = -1
15:49:59   [ERR] Maximum space for AOT bytes          = -1
15:49:59   [ERR] Reserved space for JIT data bytes    = -1
15:49:59   [ERR] Maximum space for JIT data bytes     = -1
15:49:59   [ERR] Metadata bytes                       = 36540
15:49:59   [ERR] Metadata % used                      = 0%
15:49:59   [ERR] Class debug area size                = 25133056
15:49:59   [ERR] Class debug area used bytes          = 698110
15:49:59   [ERR] Class debug area % used              = 2%
15:49:59   [ERR] 
15:49:59   [ERR] ROMClass bytes                       = 2961752
15:49:59   [ERR] AOT bytes                            = 0
15:49:59   [ERR] JIT data bytes                       = 0
15:49:59   [ERR] Zip cache bytes                      = 0
15:49:59   [ERR] Startup hint bytes                   = 0
15:49:59   [ERR] Data bytes                           = 363936
15:49:59   [ERR] stale bytes                          = 0
15:49:59   [ERR] 
15:49:59   [ERR] # ROMClasses                         = 819
15:49:59   [ERR] # AOT Methods                        = 0
15:49:59   [ERR] # Classpaths                         = 2
15:49:59   [ERR] # URLs                               = 0
15:49:59   [ERR] # Tokens                             = 0
15:49:59   [ERR] # Zip caches                         = 0
15:49:59   [ERR] # Startup hints                      = 0
15:49:59   [ERR] # Additional startup hints allowed   = 32
15:49:59   [ERR] # Stale classes                      = 0
15:49:59   [ERR] % Stale classes                      = 0%
15:49:59   [ERR] 
15:49:59   [ERR] 
15:49:59   [ERR] Cache is 6% soft full
15:49:59   [ERR] 
15:49:59   [ERR] Cache is accessible to current user = true
15:49:59  >> Success condition was not found: [Output match: STARTUP HINTS KEY:]
15:49:59  >> Required condition was not found: [Output match: # Startup hints[\s]*= 2]
15:49:59  >> Required condition was not found: [Output match: # Additional startup hints allowed[\s]*= 31]
15:49:59  >> Failure condition was found: [Output match: Startup hint bytes[\s]*= 0]
15:49:59  >> Failure condition was found: [Output match: # Startup hints[\s]*= 0]
15:49:59  >> Failure condition was not found: [Output match: # Startup hints[\s]*= 1]
15:49:59  >> Failure condition was not found: [Output match: Unhandled Exception]
15:49:59  >> Failure condition was not found: [Output match: corrupt]
15:49:59  >> Failure condition was not found: [Output match: Processing dump event]

Looks like there is "Startup hints" problems detection. I will investigate what is expected exactly.
Meanwhile test should be excluded.

@dmitripivkine

Copy link
Copy Markdown
Contributor

JVM has a feature to adjust default initial heap size for consecutive runs. If -Xms is not specified explicitly, JVM calculates (and stored in Shared Classes Cache) better (larger) default initial heap size to minimize startup time for the next run. In order to work JVM should recognize "repeatable" run (exactly the same application runs again), so optimized initial heap size can be applied. This feature is not supported in Balanced.
"Startup hint" contains record of full options list from previous JVM runs. I guess because this feature is only consumer of stored command line and "Startup hint" stays empty after run.
This test should be excluded for now.

@annaibm

annaibm commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the explanation @dmitripivkine 👍. I’ll go ahead and exclude this test.
Could we get an issue link to reference so I can add it into the <disable> tag for excluding?

@dmitripivkine

Copy link
Copy Markdown
Contributor

Thanks for the explanation @dmitripivkine 👍. I’ll go ahead and exclude this test. Could we get an issue link to reference so I can add it into the <disable> tag for excluding?

#22710

@annaibm
annaibm force-pushed the enableBalan branch 2 times, most recently from f82eb5c to 3688734 Compare October 2, 2025 15:33
@annaibm

annaibm commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

Grinder run after excluding testSCCMLTests6:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/55216/ ✅ passed

@annaibm

annaibm commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

- Enable functional tests to run on balanced GC modes for Jenkins
- Exclude cmdLineTester_jvmtitests_Java11andUp & testSCCMLTests6 from balanced

related:https://github.ibm.com/runtimes/automation/issues/125
Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
- Balanced exclude for testSCCMLTests6 for Mode501 and Mode551
@llxia
llxia merged commit 5d7c03a into eclipse-openj9:master Oct 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants