8381871: GenShen: ShenandoahGCHeuristics flag not reset after ignoring non-adaptive value#30714
8381871: GenShen: ShenandoahGCHeuristics flag not reset after ignoring non-adaptive value#30714pf0n wants to merge 5 commits intoopenjdk:masterfrom
Conversation
…g non-adaptive value
|
👋 Welcome back pf0n! A progress list of the required criteria for merging this PR into |
|
@pf0n This change is no longer ready for integration - check the PR body for details. |
Webrevs
|
|
/reviewers 4 |
ysramakrishna
left a comment
There was a problem hiding this comment.
Fix looks fine.
Can you verify the result of "PrintFlagsInitial"?
Yes, here's the result: $ ./build/linux-x86_64-server-release/images/jdk/bin/java -XX:+UseShenandoahGC \
-XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=static \
-XX:+PrintFlagsFinal -version | grep ShenandoahGCHeuristics
[0.001s][warning][gc] Ignoring -XX:ShenandoahGCHeuristics input: static, because generational shenandoah only supports adaptive heuristics
ccstr ShenandoahGCHeuristics = adaptive {product} {command line} |
|
I think FLAG_SET_ERGO should be used here. The FLAG_SET_DEFAULT will just assign the flag(I did not find a place where this macro is used with strings?). As far as I understand the FLAG_SET_ERGO will additionally clean the heap allocated for the string passed by the user. |
|
It would be good to add a test for this issue. grep the current tests for usage of "PrintFlagsFinal", you will find a few that call java via |
|
another example of the test: |
How about |
@mrserb good to note, I'll make that change. |
|
@ysramakrishna Here is -XX:+PrintFlagsInitial. The results are the same before my change. $ ./build/linux-x86_64-server-release/jdk/bin/java -XX:+UseShenandoahGC \
-XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=static \
-XX:+PrintFlagsInitial -version | grep ShenandoahGCHeuristics
ccstr ShenandoahGCHeuristics = adaptive {product} {default} |
test/hotspot/jtreg/gc/shenandoah/options/TestGenerationalHeuristics.java
Show resolved
Hide resolved
I assume that, after the change suggested by @mrserb , above you now get |
This is the result after the change: |
Reset ShenandoahGCHeuristics flag to "adaptive" after a non-adaptive value is set for ShenandoahGCHeuristics when using Generational Shenandoah.
Testing
Created a test file
TestGenerationalHeuristics.javathat checks if ShenandoahGCHeuristics flag is always adaptive for Generational Shenandoah.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30714/head:pull/30714$ git checkout pull/30714Update a local copy of the PR:
$ git checkout pull/30714$ git pull https://git.openjdk.org/jdk.git pull/30714/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30714View PR using the GUI difftool:
$ git pr show -t 30714Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30714.diff
Using Webrev
Link to Webrev Comment