3

Java Hotspot VM can do a number of different VM operations. When debugging safepoint times it's useful to know what was the purpose of the safepoint. Some of them are obvious: G1IncCollectionPause or FindDeadlocks, but some are not: CGC_Operation, no vm operation. There is VMOps.java, but it only lists possible values, not what they mean.

Currently, I need to know what CGC_Operation does in context of G1GC. I suspect that it is related to ConcurrentGCThread and Old gen collection, but I would like to confirm and also have some references to look for other operations.

Example:

-XX:+PrintSafepointStatistics
...
128959.961: G1IncCollectionPause [ 2636 0 1 ] [ 0 0 0 15 52 ] 0
129986.695: G1IncCollectionPause [ 2637 0 0 ] [ 0 0 0 12 51 ] 0
137019.250: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 50 ] 0
138693.219: CGC_Operation [ 2636 0 0 ] [ 0 0 0 13 338 ] 0
138726.672: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 50 ] 0
138733.984: G1IncCollectionPause [ 2636 0 1 ] [ 0 0 0 13 50 ] 0
138738.750: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 62 ] 0
Imaskar
  • 2,773
  • 24
  • 35
  • @Holger thanks, but this is a bit different thing. I need `operations`, not `options`. – Imaskar Oct 29 '19 at 16:41
  • When the documentation of the options, including the one which produces the output, doesn’t lead to a documentation of the output, I’m afraid, there is no documentation. – Holger Oct 30 '19 at 09:15

1 Answers1

3

The best (probably, the only) documentation is the source code. Fortunately, HotSpot JVM sources are very well commented.

See src/share/vm/gc_implementation/g1/vm_operations_g1.hpp:

// Concurrent GC stop-the-world operations such as remark and cleanup;
// consider sharing these with CMS's counterparts.
class VM_CGC_Operation: public VM_Operation {

no vm operation denotes the special type of periodic safepoint for various cleanup activities, see this answer

apangin
  • 92,924
  • 10
  • 193
  • 247
  • Thanks, that'll probably do. I tried to web-search it, but it didn't work. Maybe after Skara it would be better. – Imaskar Nov 18 '19 at 08:44