GCViewer icon indicating copy to clipboard operation
GCViewer copied to clipboard

Tenured Generation graph not showing up when using openJDK 11

Open altdelnow opened this issue 2 years ago • 2 comments

I have been testing GCViewer-1.37-SNAPSHOT.jar for a while and found that though there are some information on Tenured Generation in Summary. it does not show up in graphical mode. I see no parsing error.

My JVM string :

set CATALINA_OPTS="-Xlog:gc*,gc+age*=trace,gc+heap*=trace,safepoint:file=gc-%%t_%%p.log:tags,time,uptime,level:filecount=5,filesize=10M"

I am attaching sample log file for your review.

LatestGCLogs1stMar.zip

gcsnapshot

Please let me know if I am missing something ?

altdelnow avatar Mar 01 '23 10:03 altdelnow

Hi @altdelnow

The issue is not generally the OpenJDK11 logs, but G1 logs in unified GC logging format. The green rectangles show the information that currently is used by GCViewer for G1 logs: grafik

The difficult part is calculation of the regions:

  • eden + survivor -> young space
  • old -> tenured space
  • humongous -> don't know where to count them, they don't fit into the G1 region model
  • metaspace -> no regions, just plain old size.

GCViewer tries to multiply the number of regions (in the example: eden 0 + survivor 1 = 1 young region; 9 old regions) with the region size logged in the beginning of a log to get a rough size of young and tenured space. Humongous regions don't seem to be in the young nor the tenured category, I never knew where to count them. And I am also not sure, if the size of a humongous region is the same as an eden / survivor / old region.

Your trace information would probably contain all the information necessary to show more information about the regions, but it is currently ignored. In this class you see the included and excluded information by the parser: https://github.com/chewiebug/GCViewer/blob/develop/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderUnifiedJvmLogging.java#L170

The best you can get with G1 in unified GC logging format looks like this (I have turned off some information in the chart to better see the young plot): grafik You see the young space size, for tenured / old there is probably still a bug around in the parser.

The reason for this little improvement is the presence of the following line in the gc log: grafik

For a openJDK 11 serial gc log, you'll see something like this: grafik

For OpenJDK 11+ ZGC the situation is even worse than with G1. There the parser definitely needs an update.

chewiebug avatar Mar 01 '23 20:03 chewiebug

@chewiebug Would it make sense to adopt gctoolkit (previously jClarity Censum) for the parsing? I know that won't fix the display issues you discussed, but maybe it'd free up time updating the parser for the constantly changing format?

nirvdrum avatar Apr 03 '24 21:04 nirvdrum