0x7CFE / llst

LLVM powered Little Smalltalk.
Other
93 stars 10 forks source link

Feature/47/gc log #64

Closed vlastachu closed 9 years ago

vlastachu commented 9 years ago

Feature completed and tested on 32-bit ubuntu (and 64-bit arch before) with and without llvm support.

After running vm creates "gc.log" file, which format compatible with gcviewer. There is example of chart generated by command "java -jar gcviewer.jar gc.log summary.csv chart.png"

chart

Issue: #47

kpp commented 9 years ago

Great job! Congratulations!

0x7CFE commented 9 years ago

Please rebase/squash the commmits to organize the branch and fixup the unneccesary ones.

vlastachu commented 9 years ago

GCViewer posibilities

Util can be runned in GUI (default mode) if you type java -jar gcviewer.jar and then choose your log file. Or java -jar gcviewer.jar gc.log for explicit file selection in command line. GUI useful for runtime tracking metrics (chart+summary), scale chart.

Also you can type java -jar gcviewer.jar gc.log summary.csv chart.png to obtain the same characteristics statically in files for summary info (comma separated value format) and chart (png). That mode useful for usage in scripts for automatic testing gc and parsing results.

GCViewer summary information

GCViewer oriented on java which supplying multiple gc at the same type and in most cases uses generational gc with different algorithms in generations, so many metrics is not available in output. Example of csv:

gcLogFile; gc.log; -
footprint; 5,184; K
footprintAfterFullGC; n.a.; M
slopeAfterFullGC; n.a.; M/s
freedMemoryByFullGC; n.a.; M
avgFreedMemoryByFullGC; n.a.; M
avgFreedMemoryByFullGCσ; n.a.; M
avgFreedMemoryByFullGCisSig; n.a.; bool
avgfootprintAfterGC; 1,042.577; K
avgfootprintAfterGCσ; 674.98; K
avgfootprintAfterGCisSig; false; bool
slopeAfterGC; n.a.; M/s
avgRelativePostGCInc; n.a.; M/coll
freedMemoryByGC; 235.171; M

Example of interesting metrics: avgPause, avgPauseσ, throughput, totalTime.

GCViewer chart

The chart presented before again:

summary chart

There abscissa is time of program running (obvious). And there is two ordinates for different lines: memory lines scaled for first odinate and time lines for second.

Metrics imagened on chart:

What kind of information you may extract from this chart? For example you can see growing of long-lived objects below blue "bunch", which copying each collection. And you can see size of short-lived set in blue bunch which gying each collection and their relation. Also you can find a linear dependence of the delay on the amount of long-lived objects.