coleenp@4037: /* coleenp@4037: * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. coleenp@4037: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. coleenp@4037: * coleenp@4037: * This code is free software; you can redistribute it and/or modify it coleenp@4037: * under the terms of the GNU General Public License version 2 only, as coleenp@4037: * published by the Free Software Foundation. coleenp@4037: * coleenp@4037: * This code is distributed in the hope that it will be useful, but WITHOUT coleenp@4037: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or coleenp@4037: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License coleenp@4037: * version 2 for more details (a copy is included in the LICENSE file that coleenp@4037: * accompanied this code). coleenp@4037: * coleenp@4037: * You should have received a copy of the GNU General Public License version coleenp@4037: * 2 along with this work; if not, write to the Free Software Foundation, coleenp@4037: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. coleenp@4037: * coleenp@4037: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA coleenp@4037: * or visit www.oracle.com if you need additional information or have any coleenp@4037: * questions. coleenp@4037: * coleenp@4037: */ coleenp@4037: coleenp@4037: #ifndef SHARE_VM_MEMORY_METASPACECOUNTERS_HPP coleenp@4037: #define SHARE_VM_MEMORY_METASPACECOUNTERS_HPP coleenp@4037: coleenp@4037: #include "runtime/perfData.hpp" coleenp@4037: coleenp@4037: class MetaspaceCounters: public CHeapObj { coleenp@4037: friend class VMStructs; coleenp@4037: PerfVariable* _current_size; coleenp@4037: PerfVariable* _capacity; coleenp@4037: PerfVariable* _used; coleenp@4037: PerfVariable* _max_capacity; coleenp@4037: char* _name_space; coleenp@4037: static MetaspaceCounters* _metaspace_counters; coleenp@4037: void initialize(size_t min_capacity, coleenp@4037: size_t max_capacity, coleenp@4037: size_t curr_capacity, coleenp@4037: size_t used); coleenp@4037: public: coleenp@4037: MetaspaceCounters(); coleenp@4037: ~MetaspaceCounters(); coleenp@4037: coleenp@4037: void update_capacity(); coleenp@4037: void update_used(); coleenp@4037: void update_max_capacity(); coleenp@4037: coleenp@4037: void update_all(); coleenp@4037: coleenp@4037: static void initialize_performance_counters(); coleenp@4037: static void update_performance_counters(); coleenp@4037: coleenp@4037: }; coleenp@4037: #endif // SHARE_VM_MEMORY_METASPACECOUNTERS_HPP