hotspot/src/share/vm/gc/shared/gcCause.hpp
changeset 37149 f025738bbada
parent 37103 79c0f8e4b7b7
equal deleted inserted replaced
37148:042294ceef52 37149:f025738bbada
    49     _gc_locker,
    49     _gc_locker,
    50     _heap_inspection,
    50     _heap_inspection,
    51     _heap_dump,
    51     _heap_dump,
    52     _wb_young_gc,
    52     _wb_young_gc,
    53     _wb_conc_mark,
    53     _wb_conc_mark,
       
    54     _wb_full_gc,
    54     _update_allocation_context_stats_inc,
    55     _update_allocation_context_stats_inc,
    55     _update_allocation_context_stats_full,
    56     _update_allocation_context_stats_full,
    56 
    57 
    57     /* implementation independent, but reserved for GC use */
    58     /* implementation independent, but reserved for GC use */
    58     _no_gc,
    59     _no_gc,
    61 
    62 
    62     /* implementation specific */
    63     /* implementation specific */
    63 
    64 
    64     _tenured_generation_full,
    65     _tenured_generation_full,
    65     _metadata_GC_threshold,
    66     _metadata_GC_threshold,
       
    67     _metadata_GC_clear_soft_refs,
    66 
    68 
    67     _cms_generation_full,
    69     _cms_generation_full,
    68     _cms_initial_mark,
    70     _cms_initial_mark,
    69     _cms_final_remark,
    71     _cms_final_remark,
    70     _cms_concurrent_mark,
    72     _cms_concurrent_mark,
    73     _old_generation_too_full_to_scavenge,
    75     _old_generation_too_full_to_scavenge,
    74     _adaptive_size_policy,
    76     _adaptive_size_policy,
    75 
    77 
    76     _g1_inc_collection_pause,
    78     _g1_inc_collection_pause,
    77     _g1_humongous_allocation,
    79     _g1_humongous_allocation,
    78 
       
    79     _last_ditch_collection,
       
    80 
    80 
    81     _dcmd_gc_run,
    81     _dcmd_gc_run,
    82 
    82 
    83     _last_gc_cause
    83     _last_gc_cause
    84   };
    84   };
   104     // _tenured_generation_full or _cms_generation_full for full tenured generations
   104     // _tenured_generation_full or _cms_generation_full for full tenured generations
   105     // _adaptive_size_policy for a full collection after a young GC
   105     // _adaptive_size_policy for a full collection after a young GC
   106     // _allocation_failure is the generic cause a collection which could result
   106     // _allocation_failure is the generic cause a collection which could result
   107     // in the collection of the tenured generation if there is not enough space
   107     // in the collection of the tenured generation if there is not enough space
   108     // in the tenured generation to support a young GC.
   108     // in the tenured generation to support a young GC.
   109     // _last_ditch_collection is a collection done to include SoftReferences.
       
   110     return (cause == GCCause::_tenured_generation_full ||
   109     return (cause == GCCause::_tenured_generation_full ||
   111             cause == GCCause::_cms_generation_full ||
   110             cause == GCCause::_cms_generation_full ||
   112             cause == GCCause::_adaptive_size_policy ||
   111             cause == GCCause::_adaptive_size_policy ||
   113             cause == GCCause::_allocation_failure ||
   112             cause == GCCause::_allocation_failure);
   114             cause == GCCause::_last_ditch_collection);
       
   115   }
   113   }
   116 
   114 
   117   // Causes for collection of the young generation
   115   // Causes for collection of the young generation
   118   inline static bool is_allocation_failure_gc(GCCause::Cause cause) {
   116   inline static bool is_allocation_failure_gc(GCCause::Cause cause) {
   119     // _allocation_failure is the generic cause a collection for allocation failure
   117     // _allocation_failure is the generic cause a collection for allocation failure
   120     // _adaptive_size_policy is for a collecton done before a full GC
   118     // _adaptive_size_policy is for a collecton done before a full GC
   121     // _last_ditch_collection is a collection done to include SoftReferences.
       
   122     return (cause == GCCause::_allocation_failure ||
   119     return (cause == GCCause::_allocation_failure ||
   123             cause == GCCause::_adaptive_size_policy ||
   120             cause == GCCause::_adaptive_size_policy);
   124             cause == GCCause::_last_ditch_collection);
       
   125   }
   121   }
   126 
   122 
   127   // Return a string describing the GCCause.
   123   // Return a string describing the GCCause.
   128   static const char* to_string(GCCause::Cause cause);
   124   static const char* to_string(GCCause::Cause cause);
   129 };
   125 };