0N/A/*
3112N/A * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "gc_interface/gcCause.hpp"
0N/A
0N/Aconst char* GCCause::to_string(GCCause::Cause cause) {
0N/A switch (cause) {
0N/A case _java_lang_system_gc:
0N/A return "System.gc()";
0N/A
0N/A case _full_gc_alot:
0N/A return "FullGCAlot";
0N/A
0N/A case _scavenge_alot:
0N/A return "ScavengeAlot";
0N/A
0N/A case _allocation_profiler:
0N/A return "Allocation Profiler";
0N/A
0N/A case _jvmti_force_gc:
0N/A return "JvmtiEnv ForceGarbageCollection";
0N/A
0N/A case _gc_locker:
0N/A return "GCLocker Initiated GC";
0N/A
0N/A case _heap_inspection:
0N/A return "Heap Inspection Initiated GC";
0N/A
0N/A case _heap_dump:
0N/A return "Heap Dump Initiated GC";
0N/A
2912N/A case _no_gc:
2912N/A return "No GC";
2912N/A
2912N/A case _allocation_failure:
2912N/A return "Allocation Failure";
2912N/A
0N/A case _tenured_generation_full:
0N/A return "Tenured Generation Full";
0N/A
0N/A case _permanent_generation_full:
0N/A return "Permanent Generation Full";
0N/A
0N/A case _cms_generation_full:
0N/A return "CMS Generation Full";
0N/A
0N/A case _cms_initial_mark:
0N/A return "CMS Initial Mark";
0N/A
0N/A case _cms_final_remark:
0N/A return "CMS Final Remark";
0N/A
4206N/A case _cms_concurrent_mark:
4206N/A return "CMS Concurrent Mark";
4206N/A
0N/A case _old_generation_expanded_on_last_scavenge:
0N/A return "Old Generation Expanded On Last Scavenge";
0N/A
0N/A case _old_generation_too_full_to_scavenge:
0N/A return "Old Generation Too Full To Scavenge";
0N/A
2912N/A case _adaptive_size_policy:
2912N/A return "Ergonomics";
2912N/A
1576N/A case _g1_inc_collection_pause:
1576N/A return "G1 Evacuation Pause";
1576N/A
3112N/A case _g1_humongous_allocation:
3112N/A return "G1 Humongous Allocation";
3112N/A
0N/A case _last_ditch_collection:
0N/A return "Last ditch collection";
0N/A
0N/A case _last_gc_cause:
0N/A return "ILLEGAL VALUE - last gc cause - ILLEGAL VALUE";
0N/A
0N/A default:
0N/A return "unknown GCCause";
0N/A }
0N/A ShouldNotReachHere();
0N/A}