/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "memory/allocation.hpp"
#include "memory/generation.hpp"
#include "runtime/handles.hpp"
#include "services/memoryUsage.hpp"
#include "gc_interface/gcCause.hpp"
// Forward declaration
class MemoryPool;
class MemoryManager;
class GCMemoryManager;
class CollectedHeap;
class Generation;
class DefNewGeneration;
class PSYoungGen;
class PSOldGen;
class PSPermGen;
class CodeHeap;
class ContiguousSpace;
class CompactibleFreeListSpace;
class PermanentGenerationSpec;
class GenCollectedHeap;
class ParallelScavengeHeap;
class CompactingPermGenGen;
class CMSPermGenGen;
class G1CollectedHeap;
// VM Monitoring and Management Support
private:
enum {
};
// index for minor and major generations
enum {
minor = 0,
};
// memory managers for minor and major GC statistics
// Code heap memory pool
}
MemoryManager* mgr);
MemoryManager* mgr);
MemoryManager* mgr);
MemoryManager* mgr);
MemoryManager* mgr);
MemoryManager* mgr);
const char* name,
bool is_heap,
bool support_usage_threshold);
const char* name,
bool is_heap,
bool support_usage_threshold);
const char* name,
bool is_heap,
bool support_usage_threshold);
const char* name,
bool is_heap,
bool support_usage_threshold);
public:
static const int num_memory_pools() {
return _pools_list->length();
}
static const int num_memory_managers() {
return _managers_list->length();
}
}
}
static void track_memory_usage();
static void track_code_cache_memory_usage() {
}
bool recordAccumulatedGCTime,
bool recordPreGCUsage, bool recordPeakUsage);
bool recordAccumulatedGCTime,
bool recordGCEndTime, bool countCollection,
static void oops_do(OopClosure* f);
static bool set_verbose(bool verbose);
// Create an instance of java/lang/management/MemoryUsage
return _minor_gc_manager;
}
return _major_gc_manager;
}
};
private:
bool _fullGC;
bool _recordGCBeginTime;
bool _recordPreGCUsage;
bool _recordPeakUsage;
bool _recordPostGCUsage;
bool _recordAccumulatedGCTime;
bool _recordGCEndTime;
bool _countCollection;
public:
bool recordGCBeginTime = true,
bool recordPreGCUsage = true,
bool recordPeakUsage = true,
bool recordPostGCUsage = true,
bool recordAccumulatedGCTime = true,
bool recordGCEndTime = true,
bool countCollection = true);
void initialize(bool fullGC,
bool recordGCBeginTime,
bool recordPreGCUsage,
bool recordPeakUsage,
bool recordPostGCUsage,
bool recordAccumulatedGCTime,
bool recordGCEndTime,
bool countCollection);
};
#endif // SHARE_VM_SERVICES_MEMORYSERVICE_HPP