< prev index next >

src/share/vm/services/memoryManager.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 39,53 **** class MemoryPool; class GCMemoryManager; class OopClosure; class MemoryManager : public CHeapObj<mtInternal> { ! private: enum { max_num_pools = 10 }; MemoryPool* _pools[max_num_pools]; int _num_pools; protected: volatile instanceOop _memory_mgr_obj; --- 39,54 ---- class MemoryPool; class GCMemoryManager; class OopClosure; class MemoryManager : public CHeapObj<mtInternal> { ! protected: enum { max_num_pools = 10 }; + private: MemoryPool* _pools[max_num_pools]; int _num_pools; protected: volatile instanceOop _memory_mgr_obj;
*** 73,83 **** MemoryPool* get_memory_pool(int index) { assert(index >= 0 && index < _num_pools, "Invalid index"); return _pools[index]; } ! void add_pool(MemoryPool* pool); bool is_manager(instanceHandle mh) { return mh() == _memory_mgr_obj; } virtual instanceOop get_memory_manager_instance(TRAPS); virtual MemoryManager::Name kind() { return MemoryManager::Abstract; } --- 74,84 ---- MemoryPool* get_memory_pool(int index) { assert(index >= 0 && index < _num_pools, "Invalid index"); return _pools[index]; } ! int add_pool(MemoryPool* pool); bool is_manager(instanceHandle mh) { return mh() == _memory_mgr_obj; } virtual instanceOop get_memory_manager_instance(TRAPS); virtual MemoryManager::Name kind() { return MemoryManager::Abstract; }
*** 175,188 **** --- 176,199 ---- GCStatInfo* _last_gc_stat; Mutex* _last_gc_lock; GCStatInfo* _current_gc_stat; int _num_gc_threads; volatile bool _notification_enabled; + bool _pool_always_affected_by_gc[MemoryManager::max_num_pools]; + public: GCMemoryManager(); ~GCMemoryManager(); + void add_pool(MemoryPool* pool); + void add_pool(MemoryPool* pool, bool always_affected_by_gc); + + bool pool_always_affected_by_gc(int index) { + assert(index >= 0 && index < num_memory_pools(), "Invalid index"); + return _pool_always_affected_by_gc[index]; + } + void initialize_gc_stat_info(); bool is_gc_memory_manager() { return true; } jlong gc_time_ms() { return _accumulated_timer.milliseconds(); } size_t gc_count() { return _num_collections; }
*** 190,200 **** void set_num_gc_threads(int count) { _num_gc_threads = count; } void gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, bool recordAccumulatedGCTime); void gc_end(bool recordPostGCUsage, bool recordAccumulatedGCTime, ! bool recordGCEndTime, bool countCollection, GCCause::Cause cause); void reset_gc_stat() { _num_collections = 0; _accumulated_timer.reset(); } // Copy out _last_gc_stat to the given destination, returning // the collection count. Zero signifies no gc has taken place. --- 201,212 ---- void set_num_gc_threads(int count) { _num_gc_threads = count; } void gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, bool recordAccumulatedGCTime); void gc_end(bool recordPostGCUsage, bool recordAccumulatedGCTime, ! bool recordGCEndTime, bool countCollection, GCCause::Cause cause, ! bool allMemoryPoolsAffected); void reset_gc_stat() { _num_collections = 0; _accumulated_timer.reset(); } // Copy out _last_gc_stat to the given destination, returning // the collection count. Zero signifies no gc has taken place.
< prev index next >