eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

Equivalent openj9 VM option for PrintFlagsFinal/PrintFlagsInitial ? #527

Open gpadasal opened 6 years ago

gpadasal commented 6 years ago

On openjdk we have VM options -XX:+PrintFlagsFinal and -XX:+PrintFlagsInitial which helps user check the final and the initial VM options used by the running Java. Although the javacore displays only subset of these options , it would be nice to explicitly list all when needed .

For instance , if we need to check whether any option is supported/ignored by VM as in case of say -XX:+UseConcMarkSweepGC , we could simply use PrintFlagsFinal option to see whether UseConcMarkSweepGC option is listed in first place and if yes then what is its value .

We could also use this facility to compare the initial(options provided to VM initially before VM has made its own tweaks and before any argument processing) and the final values to see what optimizations the VM has made . This would be helpful if the openj9 jvm makes further optimizations or platform-specific tweaks to the options .

rubin55 commented 5 years ago

I actually ran into this today, the fact that openj9 does not show effective settings with java -XX:+PrintFlagsFinal -version. Just want to let you guys know that that's very unhelpful! Is there another way to obtain this information when using openj9?

pshipton commented 5 years ago

Is there another way to obtain this information when using openj9?

Only for some sub-sets. Is there something in particular you are looking for?

-verbose:sizes -Xdump:what -Xtrace:what -verbose:gc shows some settings

rubin55 commented 5 years ago

Aaah awesome, thanks! I was looking for initial/maximum memory sizes; -verbose:sizes shows me what I'm looking for.