< prev index next >

src/hotspot/share/services/memoryManager.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2017, 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.
*** 42,56 **** 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; const char* _name; --- 42,57 ---- 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; const char* _name;
*** 64,74 **** 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 bool is_gc_memory_manager() { return false; } --- 65,75 ---- 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 bool is_gc_memory_manager() { return false; }
*** 141,166 **** Mutex* _last_gc_lock; GCStatInfo* _current_gc_stat; int _num_gc_threads; volatile bool _notification_enabled; const char* _gc_end_message; public: GCMemoryManager(const char* name, const char* gc_end_message); ~GCMemoryManager(); ! 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; } int num_gc_threads() { return _num_gc_threads; } 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. --- 142,176 ---- Mutex* _last_gc_lock; GCStatInfo* _current_gc_stat; int _num_gc_threads; volatile bool _notification_enabled; const char* _gc_end_message; + bool _pool_always_affected_by_gc[MemoryManager::max_num_pools]; + public: GCMemoryManager(const char* name, const char* gc_end_message); ~GCMemoryManager(); ! int add_pool(MemoryPool* pool, bool always_affected_by_gc = true); ! 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; } int num_gc_threads() { return _num_gc_threads; } 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 >