3 Replies Latest reply: Mar 11, 2008 7:28 AM by 807557 RSS

    rtjvm wont print "Full GC"

    807557

      I want to log the time when a "Full GC" occurs in the rtjvm, but the RTJVM never logs the "Full GC" event. How can I log them ?
      ( preferably with minimum perfomance loss of the app )
      I run these jvm arguments in terminal:

      -verbose:gc -XX:+PrintGCTimeStamps
      -XX:RTGCCriticalReservedBytes=1000000
      -XX:ScopedSize=64m
      -XX:ImmortalSize=64m
      -Xint -Xmx512m <my_app>

      The resulting log:
      h6. "0.000: [GC, 0.0000010 secs] 523309K->523077K(524288K, non fragmented current 1210K / min 976K / worst 976K, blocked threads: max 4 / 3 still blocked (for 37503 bytes), dark matter: 8240K in 261647 blocks smaller than 1024 bytes) {GCing: 135% CPU, Cycle: 46% CPU}
      9.967: [GC, 0.0000010 secs]523077K->1270K(524288K, non fragmented current 523017K / min 1210K / worst 976K, blocked threads: max 3 / 0 still blocked (for 0 bytes), dark matter: 54K in 96 blocks smaller than 2048 bytes) {GCing: 196% CPU, Cycle: 196% CPU}
      28.753: [GC, 0.0000010 secs]520556K->131499K(524288K, non fragmented current 392788K / min 3711K / worst 976K, blocked threads: max 0 / 0 still blocked (for 0 bytes), dark matter: 8160K in 259468 blocks smaller than 2048 bytes) {GCing: 198% CPU, Cycle: 18% CPU} "
        • 1. Re: rtjvm wont print "Full GC"
          807557
          The real-time GC in java RTS is not a generational collector so it doesn't have the concept of partial-GC and full-GC that generational collectors do.

          Note you can get even more GC details using -XX:+ PrintGCDetails

          BTW if you are concerned about performance why are you running in the interpreter (-Xint) ?

          David Holmes
          • 2. Re: rtjvm wont print "Full GC"
            807557
            Thanks for the -Xint, it shouldn't be there !

            I did run the program with Jprofiler but didnt see that some commands forced the rtjvm into non-determinstic mode. So when the log was full of "Full GC" I thought maybe "Full GC" = mark + sweep .
            ( that "Full GC" by the rtjvm ment one completed period of mark+sweep )

            Anyhow
            the -XX:+PrintGCDetails
            works nice !
            Thanks
            • 3. Re: rtjvm wont print "Full GC"
              807557
              Using some JVMTI capabilities forces the RT VM into "non-deterministic mode" which causes the Serial GC to be used rather than the Real-time GC.

              David Holmes