Which three JVM options would you add to investigate performance issues in a Hot-Spot JVM?
A.
-xx:+PrintGCDetails
B.
-xx:+PrintGCTimeStamps
C.
-xx:+HandlePromotionFailure
D.
-verbose:gc
E.
-server
Explanation:
A: Print more details at garbage collection.
B: Print timestamps at garbage collection.
C: The youngest generation collection does not require a guarantee of full promotion of all live
objects.
E: Default values are listed for Java SE 6 for Solaris Sparc with -server.
Reference: Java HotSpot VM Options
ABD
Correct is ABD, see http://docs.oracle.com/cd/E24329_01/web.1211/e24390/jvm_tuning.htm#i1131863
I believe ‘D’ is not the correct option, the way its written in option is not correct.
The correct value should be ‘-verbosegc’ not this ‘-verbose:gc’ .
On the other hand I could see reference to ‘-server’ option, refer explanation section and this link http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Sorry, I think ‘D’ is the correct option not ‘E’
‘-verbose:gc’ is a valid java option.
The command line option -verbose:gc causes information about the heap and garbage collection to be printed at each collection
ABD
ABD
•-XX:+UseSerialGC – Force HotSpot to use Serial Collector.
•-XX:+PrintGC – Print a shot message after each garbage collection is done.
•-verbose:gc – Same as “-XX:+PrintGC”.
•-XX:+PrintGCDetails – Print a long message with more details after each garbage collection is done.
•-XX:+PrintGCTimeStamps – Print a timestamp relative to the JVM start time when a garbage collection occurs.
•-XX:+PrintGCDateStamps – Print a calendar data and timestamp when a garbage collection occurs.
•-Xloggc: – Force garbage collection message to be logged into a file instead of the console.
ABE
“-verbose:gc” is unuseful because of “-XX:+PrintGCDetails”