annotate src/share/vm/memory/metaspaceGCThresholdUpdater.hpp @ 5982:daef39043d2c

8036698: Add trace event for updates to metaspace gc threshold Reviewed-by: stefank, mgerdin
author ehelin
date Fri, 21 Mar 2014 10:17:47 +0100
parents
children
rev   line source
ehelin@5982 1 /*
ehelin@5982 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
ehelin@5982 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ehelin@5982 4 *
ehelin@5982 5 * This code is free software; you can redistribute it and/or modify it
ehelin@5982 6 * under the terms of the GNU General Public License version 2 only, as
ehelin@5982 7 * published by the Free Software Foundation.
ehelin@5982 8 *
ehelin@5982 9 * This code is distributed in the hope that it will be useful, but WITHOUT
ehelin@5982 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ehelin@5982 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ehelin@5982 12 * version 2 for more details (a copy is included in the LICENSE file that
ehelin@5982 13 * accompanied this code).
ehelin@5982 14 *
ehelin@5982 15 * You should have received a copy of the GNU General Public License version
ehelin@5982 16 * 2 along with this work; if not, write to the Free Software Foundation,
ehelin@5982 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ehelin@5982 18 *
ehelin@5982 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ehelin@5982 20 * or visit www.oracle.com if you need additional information or have any
ehelin@5982 21 * questions.
ehelin@5982 22 *
ehelin@5982 23 */
ehelin@5982 24
ehelin@5982 25 #ifndef SHARE_VM_MEMORY_METASPACE_GC_THRESHOLD_UPDATER_HPP
ehelin@5982 26 #define SHARE_VM_MEMORY_METASPACE_GC_THRESHOLD_UPDATER_HPP
ehelin@5982 27
ehelin@5982 28 #include "memory/allocation.hpp"
ehelin@5982 29 #include "utilities/debug.hpp"
ehelin@5982 30
ehelin@5982 31 class MetaspaceGCThresholdUpdater : public AllStatic {
ehelin@5982 32 public:
ehelin@5982 33 enum Type {
ehelin@5982 34 ComputeNewSize,
ehelin@5982 35 ExpandAndAllocate,
ehelin@5982 36 Last
ehelin@5982 37 };
ehelin@5982 38
ehelin@5982 39 static const char* to_string(MetaspaceGCThresholdUpdater::Type updater) {
ehelin@5982 40 switch (updater) {
ehelin@5982 41 case ComputeNewSize:
ehelin@5982 42 return "compute_new_size";
ehelin@5982 43 case ExpandAndAllocate:
ehelin@5982 44 return "expand_and_allocate";
ehelin@5982 45 default:
ehelin@5982 46 assert(false, err_msg("Got bad updater: %d", (int) updater));
ehelin@5982 47 return NULL;
ehelin@5982 48 };
ehelin@5982 49 }
ehelin@5982 50 };
ehelin@5982 51
ehelin@5982 52 #endif // SHARE_VM_MEMORY_METASPACE_GC_THRESHOLD_UPDATER_HPP