8075416: Cleanup GC include dependencies in memoryPool.hpp
Reviewed-by: ehelin, mgerdin
This commit is contained in:
parent
28adfbf0be
commit
207fadd39e
@ -23,6 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
|
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
||||||
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
|
||||||
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
#include "gc_implementation/parNew/parNewGeneration.hpp"
|
||||||
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
#include "gc_implementation/parNew/parOopClosures.inline.hpp"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "memory/cardTableRS.hpp"
|
#include "memory/cardTableRS.hpp"
|
||||||
#include "memory/genCollectedHeap.hpp"
|
#include "memory/genCollectedHeap.hpp"
|
||||||
#include "memory/generation.hpp"
|
#include "memory/generation.hpp"
|
||||||
#include "memory/space.hpp"
|
#include "memory/space.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/atomic.inline.hpp"
|
#include "runtime/atomic.inline.hpp"
|
||||||
#include "runtime/java.hpp"
|
#include "runtime/java.hpp"
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "services/memoryPool.hpp"
|
#include "services/memoryPool.hpp"
|
||||||
#include "services/memoryService.hpp"
|
#include "services/memoryService.hpp"
|
||||||
|
#include "services/memoryUsage.hpp"
|
||||||
|
|
||||||
// Low Memory Detection Support
|
// Low Memory Detection Support
|
||||||
// Two memory alarms in the JDK (we called them sensors).
|
// Two memory alarms in the JDK (we called them sensors).
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include "precompiled.hpp"
|
#include "precompiled.hpp"
|
||||||
#include "classfile/systemDictionary.hpp"
|
#include "classfile/systemDictionary.hpp"
|
||||||
#include "classfile/vmSymbols.hpp"
|
#include "classfile/vmSymbols.hpp"
|
||||||
|
#include "memory/defNewGeneration.hpp"
|
||||||
#include "memory/metaspace.hpp"
|
#include "memory/metaspace.hpp"
|
||||||
|
#include "memory/space.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
#include "runtime/handles.inline.hpp"
|
#include "runtime/handles.inline.hpp"
|
||||||
#include "runtime/javaCalls.hpp"
|
#include "runtime/javaCalls.hpp"
|
||||||
@ -34,8 +36,11 @@
|
|||||||
#include "services/management.hpp"
|
#include "services/management.hpp"
|
||||||
#include "services/memoryManager.hpp"
|
#include "services/memoryManager.hpp"
|
||||||
#include "services/memoryPool.hpp"
|
#include "services/memoryPool.hpp"
|
||||||
#include "utilities/macros.hpp"
|
|
||||||
#include "utilities/globalDefinitions.hpp"
|
#include "utilities/globalDefinitions.hpp"
|
||||||
|
#include "utilities/macros.hpp"
|
||||||
|
#if INCLUDE_ALL_GCS
|
||||||
|
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
MemoryPool::MemoryPool(const char* name,
|
MemoryPool::MemoryPool(const char* name,
|
||||||
PoolType type,
|
PoolType type,
|
||||||
@ -187,6 +192,10 @@ ContiguousSpacePool::ContiguousSpacePool(ContiguousSpace* space,
|
|||||||
support_usage_threshold), _space(space) {
|
support_usage_threshold), _space(space) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t ContiguousSpacePool::used_in_bytes() {
|
||||||
|
return space()->used();
|
||||||
|
}
|
||||||
|
|
||||||
MemoryUsage ContiguousSpacePool::get_memory_usage() {
|
MemoryUsage ContiguousSpacePool::get_memory_usage() {
|
||||||
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
||||||
size_t used = used_in_bytes();
|
size_t used = used_in_bytes();
|
||||||
@ -204,6 +213,14 @@ SurvivorContiguousSpacePool::SurvivorContiguousSpacePool(DefNewGeneration* gen,
|
|||||||
support_usage_threshold), _gen(gen) {
|
support_usage_threshold), _gen(gen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t SurvivorContiguousSpacePool::used_in_bytes() {
|
||||||
|
return _gen->from()->used();
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t SurvivorContiguousSpacePool::committed_in_bytes() {
|
||||||
|
return _gen->from()->capacity();
|
||||||
|
}
|
||||||
|
|
||||||
MemoryUsage SurvivorContiguousSpacePool::get_memory_usage() {
|
MemoryUsage SurvivorContiguousSpacePool::get_memory_usage() {
|
||||||
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
||||||
size_t used = used_in_bytes();
|
size_t used = used_in_bytes();
|
||||||
@ -222,6 +239,10 @@ CompactibleFreeListSpacePool::CompactibleFreeListSpacePool(CompactibleFreeListSp
|
|||||||
support_usage_threshold), _space(space) {
|
support_usage_threshold), _space(space) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t CompactibleFreeListSpacePool::used_in_bytes() {
|
||||||
|
return _space->used();
|
||||||
|
}
|
||||||
|
|
||||||
MemoryUsage CompactibleFreeListSpacePool::get_memory_usage() {
|
MemoryUsage CompactibleFreeListSpacePool::get_memory_usage() {
|
||||||
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
size_t maxSize = (available_for_allocation() ? max_size() : 0);
|
||||||
size_t used = used_in_bytes();
|
size_t used = used_in_bytes();
|
||||||
@ -239,6 +260,10 @@ GenerationPool::GenerationPool(Generation* gen,
|
|||||||
support_usage_threshold), _gen(gen) {
|
support_usage_threshold), _gen(gen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t GenerationPool::used_in_bytes() {
|
||||||
|
return _gen->used();
|
||||||
|
}
|
||||||
|
|
||||||
MemoryUsage GenerationPool::get_memory_usage() {
|
MemoryUsage GenerationPool::get_memory_usage() {
|
||||||
size_t used = used_in_bytes();
|
size_t used = used_in_bytes();
|
||||||
size_t committed = _gen->capacity();
|
size_t committed = _gen->capacity();
|
||||||
|
@ -25,15 +25,9 @@
|
|||||||
#ifndef SHARE_VM_SERVICES_MEMORYPOOL_HPP
|
#ifndef SHARE_VM_SERVICES_MEMORYPOOL_HPP
|
||||||
#define SHARE_VM_SERVICES_MEMORYPOOL_HPP
|
#define SHARE_VM_SERVICES_MEMORYPOOL_HPP
|
||||||
|
|
||||||
#include "gc_implementation/shared/mutableSpace.hpp"
|
|
||||||
#include "memory/defNewGeneration.hpp"
|
|
||||||
#include "memory/heap.hpp"
|
#include "memory/heap.hpp"
|
||||||
#include "memory/space.hpp"
|
|
||||||
#include "services/memoryUsage.hpp"
|
#include "services/memoryUsage.hpp"
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
#if INCLUDE_ALL_GCS
|
|
||||||
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
|
|
||||||
#endif // INCLUDE_ALL_GCS
|
|
||||||
|
|
||||||
// A memory pool represents the memory area that the VM manages.
|
// A memory pool represents the memory area that the VM manages.
|
||||||
// The Java virtual machine has at least one memory pool
|
// The Java virtual machine has at least one memory pool
|
||||||
@ -43,6 +37,8 @@
|
|||||||
// both heap and non-heap memory.
|
// both heap and non-heap memory.
|
||||||
|
|
||||||
// Forward declaration
|
// Forward declaration
|
||||||
|
class CompactibleFreeListSpace;
|
||||||
|
class ContiguousSpace;
|
||||||
class MemoryManager;
|
class MemoryManager;
|
||||||
class SensorInfo;
|
class SensorInfo;
|
||||||
class Generation;
|
class Generation;
|
||||||
@ -162,7 +158,7 @@ public:
|
|||||||
|
|
||||||
ContiguousSpace* space() { return _space; }
|
ContiguousSpace* space() { return _space; }
|
||||||
MemoryUsage get_memory_usage();
|
MemoryUsage get_memory_usage();
|
||||||
size_t used_in_bytes() { return space()->used(); }
|
size_t used_in_bytes();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SurvivorContiguousSpacePool : public CollectedMemoryPool {
|
class SurvivorContiguousSpacePool : public CollectedMemoryPool {
|
||||||
@ -178,12 +174,8 @@ public:
|
|||||||
|
|
||||||
MemoryUsage get_memory_usage();
|
MemoryUsage get_memory_usage();
|
||||||
|
|
||||||
size_t used_in_bytes() {
|
size_t used_in_bytes();
|
||||||
return _gen->from()->used();
|
size_t committed_in_bytes();
|
||||||
}
|
|
||||||
size_t committed_in_bytes() {
|
|
||||||
return _gen->from()->capacity();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if INCLUDE_ALL_GCS
|
#if INCLUDE_ALL_GCS
|
||||||
@ -198,7 +190,7 @@ public:
|
|||||||
bool support_usage_threshold);
|
bool support_usage_threshold);
|
||||||
|
|
||||||
MemoryUsage get_memory_usage();
|
MemoryUsage get_memory_usage();
|
||||||
size_t used_in_bytes() { return _space->used(); }
|
size_t used_in_bytes();
|
||||||
};
|
};
|
||||||
#endif // INCLUDE_ALL_GCS
|
#endif // INCLUDE_ALL_GCS
|
||||||
|
|
||||||
@ -210,7 +202,7 @@ public:
|
|||||||
GenerationPool(Generation* gen, const char* name, PoolType type, bool support_usage_threshold);
|
GenerationPool(Generation* gen, const char* name, PoolType type, bool support_usage_threshold);
|
||||||
|
|
||||||
MemoryUsage get_memory_usage();
|
MemoryUsage get_memory_usage();
|
||||||
size_t used_in_bytes() { return _gen->used(); }
|
size_t used_in_bytes();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CodeHeapPool: public MemoryPool {
|
class CodeHeapPool: public MemoryPool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user