src/share/vm/gc_interface/gcCause.cpp

changeset 0
f90c822e73f8
child 6876
710a3c8b516e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/gc_interface/gcCause.cpp	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,103 @@
     1.4 +/*
     1.5 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 + * or visit www.oracle.com if you need additional information or have any
    1.24 + * questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +#include "precompiled.hpp"
    1.29 +#include "gc_interface/gcCause.hpp"
    1.30 +
    1.31 +const char* GCCause::to_string(GCCause::Cause cause) {
    1.32 +  switch (cause) {
    1.33 +    case _java_lang_system_gc:
    1.34 +      return "System.gc()";
    1.35 +
    1.36 +    case _full_gc_alot:
    1.37 +      return "FullGCAlot";
    1.38 +
    1.39 +    case _scavenge_alot:
    1.40 +      return "ScavengeAlot";
    1.41 +
    1.42 +    case _allocation_profiler:
    1.43 +      return "Allocation Profiler";
    1.44 +
    1.45 +    case _jvmti_force_gc:
    1.46 +      return "JvmtiEnv ForceGarbageCollection";
    1.47 +
    1.48 +    case _gc_locker:
    1.49 +      return "GCLocker Initiated GC";
    1.50 +
    1.51 +    case _heap_inspection:
    1.52 +      return "Heap Inspection Initiated GC";
    1.53 +
    1.54 +    case _heap_dump:
    1.55 +      return "Heap Dump Initiated GC";
    1.56 +
    1.57 +    case _no_gc:
    1.58 +      return "No GC";
    1.59 +
    1.60 +    case _allocation_failure:
    1.61 +      return "Allocation Failure";
    1.62 +
    1.63 +    case _tenured_generation_full:
    1.64 +      return "Tenured Generation Full";
    1.65 +
    1.66 +    case _metadata_GC_threshold:
    1.67 +      return "Metadata GC Threshold";
    1.68 +
    1.69 +    case _cms_generation_full:
    1.70 +      return "CMS Generation Full";
    1.71 +
    1.72 +    case _cms_initial_mark:
    1.73 +      return "CMS Initial Mark";
    1.74 +
    1.75 +    case _cms_final_remark:
    1.76 +      return "CMS Final Remark";
    1.77 +
    1.78 +    case _cms_concurrent_mark:
    1.79 +      return "CMS Concurrent Mark";
    1.80 +
    1.81 +    case _old_generation_expanded_on_last_scavenge:
    1.82 +      return "Old Generation Expanded On Last Scavenge";
    1.83 +
    1.84 +    case _old_generation_too_full_to_scavenge:
    1.85 +      return "Old Generation Too Full To Scavenge";
    1.86 +
    1.87 +    case _adaptive_size_policy:
    1.88 +      return "Ergonomics";
    1.89 +
    1.90 +    case _g1_inc_collection_pause:
    1.91 +      return "G1 Evacuation Pause";
    1.92 +
    1.93 +    case _g1_humongous_allocation:
    1.94 +      return "G1 Humongous Allocation";
    1.95 +
    1.96 +    case _last_ditch_collection:
    1.97 +      return "Last ditch collection";
    1.98 +
    1.99 +    case _last_gc_cause:
   1.100 +      return "ILLEGAL VALUE - last gc cause - ILLEGAL VALUE";
   1.101 +
   1.102 +    default:
   1.103 +      return "unknown GCCause";
   1.104 +  }
   1.105 +  ShouldNotReachHere();
   1.106 +}

mercurial