@@ -248,6 +248,14 @@ public boolean isFull() {
248248 return false ;
249249 }
250250
251+ /**
252+ * Returns true, if this event was triggered by a call to "System.gc()"
253+ * @return <code>true</code> if triggered by "System.gc()"
254+ */
255+ public boolean isSystem () {
256+ return getExtendedType ().getName ().contains ("System" );
257+ }
258+
251259 public boolean isInc () {
252260 return getExtendedType ().getType () == GCEvent .Type .INC_GC ;
253261 }
@@ -494,9 +502,7 @@ public String toString() {
494502 public static final Type SCAVENGE_BEFORE_REMARK = new Type ("Scavenge-Before-Remark" , Generation .ALL );
495503
496504 public static final Type FULL_GC = new Type ("Full GC" , Generation .ALL );
497- public static final Type FULL_GC_SYSTEM = new Type ("Full GC (System)" , Generation .ALL );
498505 public static final Type GC = new Type ("GC" , Generation .YOUNG );
499- public static final Type GC_SYSTEM = new Type ("GC (System.gc())" , Generation .YOUNG );
500506 public static final Type DEF_NEW = new Type ("DefNew" , Generation .YOUNG , Concurrency .SERIAL ); // single threaded
501507 public static final Type PAR_NEW = new Type ("ParNew" , Generation .YOUNG ); // parallel
502508 public static final Type ASPAR_NEW = new Type ("ASParNew" , Generation .YOUNG ); // parallel (CMS AdaptiveSizePolicy)
@@ -519,11 +525,11 @@ public String toString() {
519525 public static final Type CMS_PERM = new Type ("CMS Perm" , Generation .PERM , Concurrency .SERIAL , GcPattern .GC_MEMORY );
520526
521527 // Parnew (promotion failed)
522- public static final Type PAR_NEW_PROMOTION_FAILED = new Type ("ParNew (promotion failed)" , Generation .YOUNG , Concurrency .SERIAL );
528+ public static final Type PAR_NEW_PROMOTION_FAILED = new Type ("ParNew (promotion failed)" , Generation .YOUNG , Concurrency .SERIAL );
523529
524530 // CMS (concurrent mode failure / interrupted)
525- public static final Type CMS_CMF = new Type ("CMS (concurrent mode failure)" , Generation .TENURED , Concurrency .SERIAL );
526- public static final Type CMS_CMI = new Type ("CMS (concurrent mode interrupted)" , Generation .TENURED , Concurrency .SERIAL );
531+ public static final Type CMS_CMF = new Type ("CMS (concurrent mode failure)" , Generation .TENURED , Concurrency .SERIAL );
532+ public static final Type CMS_CMI = new Type ("CMS (concurrent mode interrupted)" , Generation .TENURED , Concurrency .SERIAL );
527533
528534 // CMS (Concurrent Mark Sweep) Event Types
529535 public static final Type CMS_CONCURRENT_MARK_START = new Type ("CMS-concurrent-mark-start" , Generation .TENURED , Concurrency .CONCURRENT , GcPattern .GC );
@@ -544,7 +550,7 @@ public String toString() {
544550 public static final Type ASCMS = new Type ("ASCMS" , Generation .TENURED );
545551
546552 // Parnew (promotion failed) AdaptiveSizePolicy
547- public static final Type ASPAR_NEW_PROMOTION_FAILED = new Type ("ASParNew (promotion failed)" , Generation .YOUNG , Concurrency .SERIAL );
553+ public static final Type ASPAR_NEW_PROMOTION_FAILED = new Type ("ASParNew (promotion failed)" , Generation .YOUNG , Concurrency .SERIAL );
548554
549555 // CMS (concurrent mode failure / interrupted) AdaptiveSizePolicy
550556 public static final Type ASCMS_CMF = new Type ("ASCMS (concurrent mode failure)" , Generation .TENURED , Concurrency .SERIAL );
@@ -564,9 +570,6 @@ public String toString() {
564570 public static final Type ASCMS_INITIAL_MARK = new Type ("ASCMS-initial-mark" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_PAUSE , CollectionType .CONCURRENCY_HELPER );
565571 public static final Type ASCMS_REMARK = new Type ("ASCMS-remark" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY , CollectionType .CONCURRENCY_HELPER );
566572
567- // G1 stop the world types
568- public static final Type G1_FULL_GC_SYSTEM = new Type ("Full GC (System.gc())" , Generation .ALL , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
569-
570573 // only young collection
571574 public static final Type G1_YOUNG = new Type ("GC pause (young)" , Generation .YOUNG , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
572575 public static final Type G1_YOUNG_MARK_STACK_FULL = new Type ("GC pause (young)Mark stack is full." , Generation .YOUNG , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
@@ -583,7 +586,6 @@ public String toString() {
583586
584587 // TODO: Generation: young and tenured!
585588 public static final Type G1_YOUNG_INITIAL_MARK = new Type ("GC pause (young) (initial-mark)" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
586- public static final Type G1_YOUNG_INITIAL_MARK_SYSTEM_GC = new Type ("GC pause (System.gc()) (young) (initial-mark)" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
587589 public static final Type G1_YOUNG_INITIAL_MARK_TO_SPACE_OVERFLOW = new Type ("GC pause (young) (to-space overflow) (initial-mark)" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
588590 // The following two Types are basically the same but in a different order. In JDK 6 the order was defined, no longer the case with JDK 7 (see: https://github.com/chewiebug/GCViewer/issues/100)
589591 public static final Type G1_YOUNG_INITIAL_MARK_TO_SPACE_EXHAUSTED = new Type ("GC pause (young) (initial-mark) (to-space exhausted)" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
@@ -612,7 +614,6 @@ public String toString() {
612614 // unified jvm logging generic event types
613615 public static final Type UJL_PAUSE_YOUNG = new Type ("Pause Young" , Generation .YOUNG , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
614616 public static final Type UJL_PAUSE_FULL = new Type ("Pause Full" , Generation .ALL , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
615- public static final Type UJL_PAUSE_FULL_SYSTEM = new Type ("Pause Full (System.gc())" , Generation .ALL , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE );
616617
617618 // unified jvm logging cms / g1 event types
618619 public static final Type UJL_PAUSE_INITIAL_MARK = new Type ("Pause Initial Mark" , Generation .TENURED , Concurrency .SERIAL , GcPattern .GC_MEMORY_PAUSE , CollectionType .CONCURRENCY_HELPER );
0 commit comments