I'm looking for a technique to find out the Garbage Collection (GC) strategy (collector) that Java VM is currently using. (Later, I would like him to correctly reflect the strategy that I chose, say XX:+UseConcMarkSweepGC.)
XX:+UseConcMarkSweepGC
verbose:gc(in its basic form) does not help, because it just shows me that all this is with every generation. Is there any other flag that I can set to spit out the GC strategy used?
verbose:gc
JDK Version - 1.6_21
Mmmm.. , , , JVM jconsole ( VM Summary). , .
EDIT: JVM , jinfo.exe JDK. , , ParallelGC, : jinfo.exe -flag UseParallelGC <PID>.
jinfo.exe
jinfo.exe -flag UseParallelGC <PID>
, JVM, GarbageCollectorMXBean
List<GarbageCollectorMXBean> gcs = ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean gc : gcs) { System.out.println(gc.getName()); }
jinfo, JDK. PID JVM , , JVM. URL- :
http://download.oracle.com/javase/6/docs/technotes/tools/share/jinfo.html
, .
Again, the behavior of the GC may influence, but is not predicted.
Source: https://habr.com/ru/post/1763562/More articles:how to check the uniqueness (not duplication) of a message in an rss feed - c #How to shift specific cells using Apache POI? - javaCan I get an active cell in a selected range in Excel? - excelNull object in C ++ - c ++Найти файлы без расширения в linux и массовое переименование их - linuxClojure hasn't! =? - clojureProblem loading files in Rails 2.3.5 using paperclip - ruby-on-railsWhat is the principle of a template in C ++? - c ++Что делает `standardUserDefaults` на` NSUserDefaults`? - nsuserdefaultsreal-time notifications using xmpp - push-notificationAll Articles