8299879: CollectedHeap hierarchy should use override
Reviewed-by: stefank, tschatzl
This commit is contained in:
parent
98d75f1879
commit
a734285314
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2017, 2022, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2017, 2022, Red Hat, Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -56,89 +57,89 @@ public:
|
|||||||
_memory_manager("Epsilon Heap", ""),
|
_memory_manager("Epsilon Heap", ""),
|
||||||
_space(NULL) {};
|
_space(NULL) {};
|
||||||
|
|
||||||
virtual Name kind() const {
|
Name kind() const override {
|
||||||
return CollectedHeap::Epsilon;
|
return CollectedHeap::Epsilon;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* name() const {
|
const char* name() const override {
|
||||||
return "Epsilon";
|
return "Epsilon";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SoftRefPolicy* soft_ref_policy() {
|
SoftRefPolicy* soft_ref_policy() override {
|
||||||
return &_soft_ref_policy;
|
return &_soft_ref_policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual jint initialize();
|
jint initialize() override;
|
||||||
virtual void initialize_serviceability();
|
void initialize_serviceability() override;
|
||||||
|
|
||||||
virtual GrowableArray<GCMemoryManager*> memory_managers();
|
GrowableArray<GCMemoryManager*> memory_managers() override;
|
||||||
virtual GrowableArray<MemoryPool*> memory_pools();
|
GrowableArray<MemoryPool*> memory_pools() override;
|
||||||
|
|
||||||
virtual size_t max_capacity() const { return _virtual_space.reserved_size(); }
|
size_t max_capacity() const override { return _virtual_space.reserved_size(); }
|
||||||
virtual size_t capacity() const { return _virtual_space.committed_size(); }
|
size_t capacity() const override { return _virtual_space.committed_size(); }
|
||||||
virtual size_t used() const { return _space->used(); }
|
size_t used() const override { return _space->used(); }
|
||||||
|
|
||||||
virtual bool is_in(const void* p) const {
|
bool is_in(const void* p) const override {
|
||||||
return _space->is_in(p);
|
return _space->is_in(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool requires_barriers(stackChunkOop obj) const { return false; }
|
bool requires_barriers(stackChunkOop obj) const override { return false; }
|
||||||
|
|
||||||
virtual bool is_maximal_no_gc() const {
|
bool is_maximal_no_gc() const override {
|
||||||
// No GC is going to happen. Return "we are at max", when we are about to fail.
|
// No GC is going to happen. Return "we are at max", when we are about to fail.
|
||||||
return used() == capacity();
|
return used() == capacity();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocation
|
// Allocation
|
||||||
HeapWord* allocate_work(size_t size, bool verbose = true);
|
HeapWord* allocate_work(size_t size, bool verbose = true);
|
||||||
virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
|
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) override;
|
||||||
virtual HeapWord* allocate_new_tlab(size_t min_size,
|
HeapWord* allocate_new_tlab(size_t min_size,
|
||||||
size_t requested_size,
|
size_t requested_size,
|
||||||
size_t* actual_size);
|
size_t* actual_size) override;
|
||||||
|
|
||||||
// TLAB allocation
|
// TLAB allocation
|
||||||
virtual size_t tlab_capacity(Thread* thr) const { return capacity(); }
|
size_t tlab_capacity(Thread* thr) const override { return capacity(); }
|
||||||
virtual size_t tlab_used(Thread* thr) const { return used(); }
|
size_t tlab_used(Thread* thr) const override { return used(); }
|
||||||
virtual size_t max_tlab_size() const { return _max_tlab_size; }
|
size_t max_tlab_size() const override { return _max_tlab_size; }
|
||||||
virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
|
size_t unsafe_max_tlab_alloc(Thread* thr) const override;
|
||||||
|
|
||||||
virtual void collect(GCCause::Cause cause);
|
void collect(GCCause::Cause cause) override;
|
||||||
virtual void do_full_collection(bool clear_all_soft_refs);
|
void do_full_collection(bool clear_all_soft_refs) override;
|
||||||
|
|
||||||
// Heap walking support
|
// Heap walking support
|
||||||
virtual void object_iterate(ObjectClosure* cl);
|
void object_iterate(ObjectClosure* cl) override;
|
||||||
|
|
||||||
// Object pinning support: every object is implicitly pinned
|
// Object pinning support: every object is implicitly pinned
|
||||||
virtual bool supports_object_pinning() const { return true; }
|
bool supports_object_pinning() const override { return true; }
|
||||||
virtual oop pin_object(JavaThread* thread, oop obj) { return obj; }
|
oop pin_object(JavaThread* thread, oop obj) override { return obj; }
|
||||||
virtual void unpin_object(JavaThread* thread, oop obj) { }
|
void unpin_object(JavaThread* thread, oop obj) override { }
|
||||||
|
|
||||||
// No support for block parsing.
|
// No support for block parsing.
|
||||||
HeapWord* block_start(const void* addr) const { return NULL; }
|
HeapWord* block_start(const void* addr) const { return NULL; }
|
||||||
bool block_is_obj(const HeapWord* addr) const { return false; }
|
bool block_is_obj(const HeapWord* addr) const { return false; }
|
||||||
|
|
||||||
// No GC threads
|
// No GC threads
|
||||||
virtual void gc_threads_do(ThreadClosure* tc) const {}
|
void gc_threads_do(ThreadClosure* tc) const override {}
|
||||||
|
|
||||||
// No nmethod handling
|
// No nmethod handling
|
||||||
virtual void register_nmethod(nmethod* nm) {}
|
void register_nmethod(nmethod* nm) override {}
|
||||||
virtual void unregister_nmethod(nmethod* nm) {}
|
void unregister_nmethod(nmethod* nm) override {}
|
||||||
virtual void verify_nmethod(nmethod* nm) {}
|
void verify_nmethod(nmethod* nm) override {}
|
||||||
|
|
||||||
// No heap verification
|
// No heap verification
|
||||||
virtual void prepare_for_verify() {}
|
void prepare_for_verify() override {}
|
||||||
virtual void verify(VerifyOption option) {}
|
void verify(VerifyOption option) override {}
|
||||||
|
|
||||||
MemRegion reserved_region() const { return _reserved; }
|
MemRegion reserved_region() const { return _reserved; }
|
||||||
bool is_in_reserved(const void* addr) const { return _reserved.contains(addr); }
|
bool is_in_reserved(const void* addr) const { return _reserved.contains(addr); }
|
||||||
|
|
||||||
// Support for loading objects from CDS archive into the heap
|
// Support for loading objects from CDS archive into the heap
|
||||||
virtual bool can_load_archived_objects() const { return UseCompressedOops; }
|
bool can_load_archived_objects() const override { return UseCompressedOops; }
|
||||||
virtual HeapWord* allocate_loaded_archive_space(size_t size);
|
HeapWord* allocate_loaded_archive_space(size_t size) override;
|
||||||
|
|
||||||
virtual void print_on(outputStream* st) const;
|
void print_on(outputStream* st) const override;
|
||||||
virtual void print_tracing_info() const;
|
void print_tracing_info() const override;
|
||||||
virtual bool print_location(outputStream* st, void* addr) const;
|
bool print_location(outputStream* st, void* addr) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void print_heap_info(size_t used) const;
|
void print_heap_info(size_t used) const;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -93,17 +93,17 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
|
|
||||||
WorkerThreads _workers;
|
WorkerThreads _workers;
|
||||||
|
|
||||||
virtual void initialize_serviceability();
|
void initialize_serviceability() override;
|
||||||
|
|
||||||
void trace_actual_reserved_page_size(const size_t reserved_heap_size, const ReservedSpace rs);
|
void trace_actual_reserved_page_size(const size_t reserved_heap_size, const ReservedSpace rs);
|
||||||
void trace_heap(GCWhen::Type when, const GCTracer* tracer);
|
void trace_heap(GCWhen::Type when, const GCTracer* tracer) override;
|
||||||
|
|
||||||
// Allocate in oldgen and record the allocation with the size_policy.
|
// Allocate in oldgen and record the allocation with the size_policy.
|
||||||
HeapWord* allocate_old_gen_and_record(size_t word_size);
|
HeapWord* allocate_old_gen_and_record(size_t word_size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static inline size_t total_invocations();
|
static inline size_t total_invocations();
|
||||||
HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size);
|
HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) override;
|
||||||
|
|
||||||
inline bool should_alloc_in_eden(size_t size) const;
|
inline bool should_alloc_in_eden(size_t size) const;
|
||||||
inline void death_march_check(HeapWord* const result, size_t size);
|
inline void death_march_check(HeapWord* const result, size_t size);
|
||||||
@ -126,23 +126,23 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
MarkSweep
|
MarkSweep
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual Name kind() const {
|
Name kind() const override {
|
||||||
return CollectedHeap::Parallel;
|
return CollectedHeap::Parallel;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* name() const {
|
const char* name() const override {
|
||||||
return "Parallel";
|
return "Parallel";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SoftRefPolicy* soft_ref_policy() { return &_soft_ref_policy; }
|
SoftRefPolicy* soft_ref_policy() override { return &_soft_ref_policy; }
|
||||||
|
|
||||||
virtual GrowableArray<GCMemoryManager*> memory_managers();
|
GrowableArray<GCMemoryManager*> memory_managers() override;
|
||||||
virtual GrowableArray<MemoryPool*> memory_pools();
|
GrowableArray<MemoryPool*> memory_pools() override;
|
||||||
|
|
||||||
static PSYoungGen* young_gen() { return _young_gen; }
|
static PSYoungGen* young_gen() { return _young_gen; }
|
||||||
static PSOldGen* old_gen() { return _old_gen; }
|
static PSOldGen* old_gen() { return _old_gen; }
|
||||||
|
|
||||||
virtual PSAdaptiveSizePolicy* size_policy() { return _size_policy; }
|
PSAdaptiveSizePolicy* size_policy() { return _size_policy; }
|
||||||
|
|
||||||
static PSGCAdaptivePolicyCounters* gc_policy_counters() { return _gc_policy_counters; }
|
static PSGCAdaptivePolicyCounters* gc_policy_counters() { return _gc_policy_counters; }
|
||||||
|
|
||||||
@ -154,38 +154,38 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
PSCardTable* card_table();
|
PSCardTable* card_table();
|
||||||
|
|
||||||
// Returns JNI_OK on success
|
// Returns JNI_OK on success
|
||||||
virtual jint initialize();
|
jint initialize() override;
|
||||||
|
|
||||||
virtual void safepoint_synchronize_begin();
|
void safepoint_synchronize_begin() override;
|
||||||
virtual void safepoint_synchronize_end();
|
void safepoint_synchronize_end() override;
|
||||||
|
|
||||||
void post_initialize();
|
void post_initialize() override;
|
||||||
void update_counters();
|
void update_counters();
|
||||||
|
|
||||||
size_t capacity() const;
|
size_t capacity() const override;
|
||||||
size_t used() const;
|
size_t used() const override;
|
||||||
|
|
||||||
// Return "true" if all generations have reached the
|
// Return "true" if all generations have reached the
|
||||||
// maximal committed limit that they can reach, without a garbage
|
// maximal committed limit that they can reach, without a garbage
|
||||||
// collection.
|
// collection.
|
||||||
virtual bool is_maximal_no_gc() const;
|
bool is_maximal_no_gc() const override;
|
||||||
|
|
||||||
virtual void register_nmethod(nmethod* nm);
|
void register_nmethod(nmethod* nm) override;
|
||||||
virtual void unregister_nmethod(nmethod* nm);
|
void unregister_nmethod(nmethod* nm) override;
|
||||||
virtual void verify_nmethod(nmethod* nm);
|
void verify_nmethod(nmethod* nm) override;
|
||||||
|
|
||||||
void prune_scavengable_nmethods();
|
void prune_scavengable_nmethods();
|
||||||
|
|
||||||
size_t max_capacity() const;
|
size_t max_capacity() const override;
|
||||||
|
|
||||||
// Whether p is in the allocated part of the heap
|
// Whether p is in the allocated part of the heap
|
||||||
bool is_in(const void* p) const;
|
bool is_in(const void* p) const override;
|
||||||
|
|
||||||
bool is_in_reserved(const void* p) const;
|
bool is_in_reserved(const void* p) const;
|
||||||
|
|
||||||
bool is_in_young(const void* p) const;
|
bool is_in_young(const void* p) const;
|
||||||
|
|
||||||
virtual bool requires_barriers(stackChunkOop obj) const;
|
bool requires_barriers(stackChunkOop obj) const override;
|
||||||
|
|
||||||
MemRegion reserved_region() const { return _reserved; }
|
MemRegion reserved_region() const { return _reserved; }
|
||||||
HeapWord* base() const { return _reserved.start(); }
|
HeapWord* base() const { return _reserved.start(); }
|
||||||
@ -195,7 +195,7 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
// an excessive amount of time is being spent doing collections
|
// an excessive amount of time is being spent doing collections
|
||||||
// and caused a NULL to be returned. If a NULL is not returned,
|
// and caused a NULL to be returned. If a NULL is not returned,
|
||||||
// "gc_time_limit_was_exceeded" has an undefined meaning.
|
// "gc_time_limit_was_exceeded" has an undefined meaning.
|
||||||
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
|
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) override;
|
||||||
|
|
||||||
// Allocation attempt(s) during a safepoint. It should never be called
|
// Allocation attempt(s) during a safepoint. It should never be called
|
||||||
// to allocate a new TLAB as this allocation might be satisfied out
|
// to allocate a new TLAB as this allocation might be satisfied out
|
||||||
@ -203,7 +203,7 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
HeapWord* failed_mem_allocate(size_t size);
|
HeapWord* failed_mem_allocate(size_t size);
|
||||||
|
|
||||||
// Support for System.gc()
|
// Support for System.gc()
|
||||||
void collect(GCCause::Cause cause);
|
void collect(GCCause::Cause cause) override;
|
||||||
|
|
||||||
// These also should be called by the vm thread at a safepoint (e.g., from a
|
// These also should be called by the vm thread at a safepoint (e.g., from a
|
||||||
// VM operation).
|
// VM operation).
|
||||||
@ -215,38 +215,38 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
inline void invoke_scavenge();
|
inline void invoke_scavenge();
|
||||||
|
|
||||||
// Perform a full collection
|
// Perform a full collection
|
||||||
virtual void do_full_collection(bool clear_all_soft_refs);
|
void do_full_collection(bool clear_all_soft_refs) override;
|
||||||
|
|
||||||
void ensure_parsability(bool retire_tlabs);
|
void ensure_parsability(bool retire_tlabs) override;
|
||||||
void resize_all_tlabs();
|
void resize_all_tlabs() override;
|
||||||
|
|
||||||
size_t tlab_capacity(Thread* thr) const;
|
size_t tlab_capacity(Thread* thr) const override;
|
||||||
size_t tlab_used(Thread* thr) const;
|
size_t tlab_used(Thread* thr) const override;
|
||||||
size_t unsafe_max_tlab_alloc(Thread* thr) const;
|
size_t unsafe_max_tlab_alloc(Thread* thr) const override;
|
||||||
|
|
||||||
void object_iterate(ObjectClosure* cl);
|
void object_iterate(ObjectClosure* cl) override;
|
||||||
void object_iterate_parallel(ObjectClosure* cl, HeapBlockClaimer* claimer);
|
void object_iterate_parallel(ObjectClosure* cl, HeapBlockClaimer* claimer);
|
||||||
virtual ParallelObjectIteratorImpl* parallel_object_iterator(uint thread_num);
|
ParallelObjectIteratorImpl* parallel_object_iterator(uint thread_num) override;
|
||||||
|
|
||||||
HeapWord* block_start(const void* addr) const;
|
HeapWord* block_start(const void* addr) const;
|
||||||
bool block_is_obj(const HeapWord* addr) const;
|
bool block_is_obj(const HeapWord* addr) const;
|
||||||
|
|
||||||
void prepare_for_verify();
|
void prepare_for_verify() override;
|
||||||
PSHeapSummary create_ps_heap_summary();
|
PSHeapSummary create_ps_heap_summary();
|
||||||
virtual void print_on(outputStream* st) const;
|
void print_on(outputStream* st) const override;
|
||||||
virtual void print_on_error(outputStream* st) const;
|
void print_on_error(outputStream* st) const override;
|
||||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
void gc_threads_do(ThreadClosure* tc) const override;
|
||||||
virtual void print_tracing_info() const;
|
void print_tracing_info() const override;
|
||||||
|
|
||||||
virtual WorkerThreads* safepoint_workers() { return &_workers; }
|
WorkerThreads* safepoint_workers() override { return &_workers; }
|
||||||
|
|
||||||
PreGenGCValues get_pre_gc_values() const;
|
PreGenGCValues get_pre_gc_values() const;
|
||||||
void print_heap_change(const PreGenGCValues& pre_gc_values) const;
|
void print_heap_change(const PreGenGCValues& pre_gc_values) const;
|
||||||
|
|
||||||
// Used to print information about locations in the hs_err file.
|
// Used to print information about locations in the hs_err file.
|
||||||
virtual bool print_location(outputStream* st, void* addr) const;
|
bool print_location(outputStream* st, void* addr) const override;
|
||||||
|
|
||||||
void verify(VerifyOption option /* ignored */);
|
void verify(VerifyOption option /* ignored */) override;
|
||||||
|
|
||||||
// Resize the young generation. The reserved space for the
|
// Resize the young generation. The reserved space for the
|
||||||
// generation may be expanded in preparation for the resize.
|
// generation may be expanded in preparation for the resize.
|
||||||
@ -270,9 +270,9 @@ class ParallelScavengeHeap : public CollectedHeap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Support for loading objects from CDS archive into the heap
|
// Support for loading objects from CDS archive into the heap
|
||||||
bool can_load_archived_objects() const { return UseCompressedOops; }
|
bool can_load_archived_objects() const override { return UseCompressedOops; }
|
||||||
HeapWord* allocate_loaded_archive_space(size_t size);
|
HeapWord* allocate_loaded_archive_space(size_t size) override;
|
||||||
void complete_loaded_archive_space(MemRegion archive_space);
|
void complete_loaded_archive_space(MemRegion archive_space) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class that can be used to print information about the
|
// Class that can be used to print information about the
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -61,23 +61,23 @@ private:
|
|||||||
MemoryPool* _survivor_pool;
|
MemoryPool* _survivor_pool;
|
||||||
MemoryPool* _old_pool;
|
MemoryPool* _old_pool;
|
||||||
|
|
||||||
virtual void initialize_serviceability();
|
void initialize_serviceability() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static SerialHeap* heap();
|
static SerialHeap* heap();
|
||||||
|
|
||||||
SerialHeap();
|
SerialHeap();
|
||||||
|
|
||||||
virtual Name kind() const {
|
Name kind() const override {
|
||||||
return CollectedHeap::Serial;
|
return CollectedHeap::Serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* name() const {
|
const char* name() const override {
|
||||||
return "Serial";
|
return "Serial";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual GrowableArray<GCMemoryManager*> memory_managers();
|
GrowableArray<GCMemoryManager*> memory_managers() override;
|
||||||
virtual GrowableArray<MemoryPool*> memory_pools();
|
GrowableArray<MemoryPool*> memory_pools() override;
|
||||||
|
|
||||||
DefNewGeneration* young_gen() const {
|
DefNewGeneration* young_gen() const {
|
||||||
assert(_young_gen->kind() == Generation::DefNew, "Wrong generation type");
|
assert(_young_gen->kind() == Generation::DefNew, "Wrong generation type");
|
||||||
@ -101,13 +101,13 @@ public:
|
|||||||
OopIterateClosure* old_gen_closure,
|
OopIterateClosure* old_gen_closure,
|
||||||
CLDClosure* cld_closure);
|
CLDClosure* cld_closure);
|
||||||
|
|
||||||
virtual void safepoint_synchronize_begin();
|
void safepoint_synchronize_begin() override;
|
||||||
virtual void safepoint_synchronize_end();
|
void safepoint_synchronize_end() override;
|
||||||
|
|
||||||
// Support for loading objects from CDS archive into the heap
|
// Support for loading objects from CDS archive into the heap
|
||||||
bool can_load_archived_objects() const { return UseCompressedOops; }
|
bool can_load_archived_objects() const override { return UseCompressedOops; }
|
||||||
HeapWord* allocate_loaded_archive_space(size_t size);
|
HeapWord* allocate_loaded_archive_space(size_t size) override;
|
||||||
void complete_loaded_archive_space(MemRegion archive_space);
|
void complete_loaded_archive_space(MemRegion archive_space) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_GC_SERIAL_SERIALHEAP_HPP
|
#endif // SHARE_GC_SERIAL_SERIALHEAP_HPP
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -125,7 +125,7 @@ protected:
|
|||||||
|
|
||||||
// Callback from VM_GenCollectFull operation.
|
// Callback from VM_GenCollectFull operation.
|
||||||
// Perform a full collection of the first max_level+1 generations.
|
// Perform a full collection of the first max_level+1 generations.
|
||||||
virtual void do_full_collection(bool clear_all_soft_refs);
|
void do_full_collection(bool clear_all_soft_refs) override;
|
||||||
void do_full_collection(bool clear_all_soft_refs, GenerationType max_generation);
|
void do_full_collection(bool clear_all_soft_refs, GenerationType max_generation);
|
||||||
|
|
||||||
// Does the "cause" of GC indicate that
|
// Does the "cause" of GC indicate that
|
||||||
@ -139,7 +139,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Returns JNI_OK on success
|
// Returns JNI_OK on success
|
||||||
virtual jint initialize();
|
jint initialize() override;
|
||||||
virtual CardTableRS* create_rem_set(const MemRegion& reserved_region);
|
virtual CardTableRS* create_rem_set(const MemRegion& reserved_region);
|
||||||
|
|
||||||
void initialize_size_policy(size_t init_eden_size,
|
void initialize_size_policy(size_t init_eden_size,
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
size_t init_survivor_size);
|
size_t init_survivor_size);
|
||||||
|
|
||||||
// Does operations required after initialization has been done.
|
// Does operations required after initialization has been done.
|
||||||
void post_initialize();
|
void post_initialize() override;
|
||||||
|
|
||||||
Generation* young_gen() const { return _young_gen; }
|
Generation* young_gen() const { return _young_gen; }
|
||||||
Generation* old_gen() const { return _old_gen; }
|
Generation* old_gen() const { return _old_gen; }
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
GenerationSpec* young_gen_spec() const;
|
GenerationSpec* young_gen_spec() const;
|
||||||
GenerationSpec* old_gen_spec() const;
|
GenerationSpec* old_gen_spec() const;
|
||||||
|
|
||||||
virtual SoftRefPolicy* soft_ref_policy() { return &_soft_ref_gen_policy; }
|
SoftRefPolicy* soft_ref_policy() override { return &_soft_ref_gen_policy; }
|
||||||
|
|
||||||
// Adaptive size policy
|
// Adaptive size policy
|
||||||
virtual AdaptiveSizePolicy* size_policy() {
|
virtual AdaptiveSizePolicy* size_policy() {
|
||||||
@ -171,47 +171,47 @@ public:
|
|||||||
// Performance Counter support
|
// Performance Counter support
|
||||||
GCPolicyCounters* counters() { return _gc_policy_counters; }
|
GCPolicyCounters* counters() { return _gc_policy_counters; }
|
||||||
|
|
||||||
size_t capacity() const;
|
size_t capacity() const override;
|
||||||
size_t used() const;
|
size_t used() const override;
|
||||||
|
|
||||||
// Save the "used_region" for both generations.
|
// Save the "used_region" for both generations.
|
||||||
void save_used_regions();
|
void save_used_regions();
|
||||||
|
|
||||||
size_t max_capacity() const;
|
size_t max_capacity() const override;
|
||||||
|
|
||||||
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
|
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) override;
|
||||||
|
|
||||||
// Perform a full collection of the heap; intended for use in implementing
|
// Perform a full collection of the heap; intended for use in implementing
|
||||||
// "System.gc". This implies as full a collection as the CollectedHeap
|
// "System.gc". This implies as full a collection as the CollectedHeap
|
||||||
// supports. Caller does not hold the Heap_lock on entry.
|
// supports. Caller does not hold the Heap_lock on entry.
|
||||||
virtual void collect(GCCause::Cause cause);
|
void collect(GCCause::Cause cause) override;
|
||||||
|
|
||||||
// Returns "TRUE" iff "p" points into the committed areas of the heap.
|
// Returns "TRUE" iff "p" points into the committed areas of the heap.
|
||||||
// The methods is_in() and is_in_youngest() may be expensive to compute
|
// The methods is_in() and is_in_youngest() may be expensive to compute
|
||||||
// in general, so, to prevent their inadvertent use in product jvm's, we
|
// in general, so, to prevent their inadvertent use in product jvm's, we
|
||||||
// restrict their use to assertion checking or verification only.
|
// restrict their use to assertion checking or verification only.
|
||||||
bool is_in(const void* p) const;
|
bool is_in(const void* p) const override;
|
||||||
|
|
||||||
// Returns true if p points into the reserved space for the young generation.
|
// Returns true if p points into the reserved space for the young generation.
|
||||||
// Assumes the young gen address range is less than that of the old gen.
|
// Assumes the young gen address range is less than that of the old gen.
|
||||||
bool is_in_young(const void* p) const;
|
bool is_in_young(const void* p) const;
|
||||||
|
|
||||||
virtual bool requires_barriers(stackChunkOop obj) const;
|
bool requires_barriers(stackChunkOop obj) const override;
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
bool is_in_partial_collection(const void* p);
|
bool is_in_partial_collection(const void* p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Optimized nmethod scanning support routines
|
// Optimized nmethod scanning support routines
|
||||||
virtual void register_nmethod(nmethod* nm);
|
void register_nmethod(nmethod* nm) override;
|
||||||
virtual void unregister_nmethod(nmethod* nm);
|
void unregister_nmethod(nmethod* nm) override;
|
||||||
virtual void verify_nmethod(nmethod* nm);
|
void verify_nmethod(nmethod* nm) override;
|
||||||
|
|
||||||
void prune_scavengable_nmethods();
|
void prune_scavengable_nmethods();
|
||||||
|
|
||||||
// Iteration functions.
|
// Iteration functions.
|
||||||
void oop_iterate(OopIterateClosure* cl);
|
void oop_iterate(OopIterateClosure* cl);
|
||||||
void object_iterate(ObjectClosure* cl);
|
void object_iterate(ObjectClosure* cl) override;
|
||||||
Space* space_containing(const void* addr) const;
|
Space* space_containing(const void* addr) const;
|
||||||
|
|
||||||
// A CollectedHeap is divided into a dense sequence of "blocks"; that is,
|
// A CollectedHeap is divided into a dense sequence of "blocks"; that is,
|
||||||
@ -236,12 +236,12 @@ public:
|
|||||||
bool block_is_obj(const HeapWord* addr) const;
|
bool block_is_obj(const HeapWord* addr) const;
|
||||||
|
|
||||||
// Section on TLAB's.
|
// Section on TLAB's.
|
||||||
virtual size_t tlab_capacity(Thread* thr) const;
|
size_t tlab_capacity(Thread* thr) const override;
|
||||||
virtual size_t tlab_used(Thread* thr) const;
|
size_t tlab_used(Thread* thr) const override;
|
||||||
virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
|
size_t unsafe_max_tlab_alloc(Thread* thr) const override;
|
||||||
virtual HeapWord* allocate_new_tlab(size_t min_size,
|
HeapWord* allocate_new_tlab(size_t min_size,
|
||||||
size_t requested_size,
|
size_t requested_size,
|
||||||
size_t* actual_size);
|
size_t* actual_size) override;
|
||||||
|
|
||||||
// The "requestor" generation is performing some garbage collection
|
// The "requestor" generation is performing some garbage collection
|
||||||
// action for which it would be useful to have scratch space. The
|
// action for which it would be useful to have scratch space. The
|
||||||
@ -254,8 +254,8 @@ public:
|
|||||||
// contributed as it needs.
|
// contributed as it needs.
|
||||||
void release_scratch();
|
void release_scratch();
|
||||||
|
|
||||||
// Ensure parsability: override
|
// Ensure parsability
|
||||||
virtual void ensure_parsability(bool retire_tlabs);
|
void ensure_parsability(bool retire_tlabs) override;
|
||||||
|
|
||||||
// Total number of full collections completed.
|
// Total number of full collections completed.
|
||||||
unsigned int total_full_collections_completed() {
|
unsigned int total_full_collections_completed() {
|
||||||
@ -274,19 +274,15 @@ public:
|
|||||||
|
|
||||||
bool no_gc_in_progress() { return !is_gc_active(); }
|
bool no_gc_in_progress() { return !is_gc_active(); }
|
||||||
|
|
||||||
// Override.
|
void prepare_for_verify() override;
|
||||||
void prepare_for_verify();
|
void verify(VerifyOption option) override;
|
||||||
|
|
||||||
// Override.
|
void print_on(outputStream* st) const override;
|
||||||
void verify(VerifyOption option);
|
void gc_threads_do(ThreadClosure* tc) const override;
|
||||||
|
void print_tracing_info() const override;
|
||||||
// Override.
|
|
||||||
virtual void print_on(outputStream* st) const;
|
|
||||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
|
||||||
virtual void print_tracing_info() const;
|
|
||||||
|
|
||||||
// Used to print information about locations in the hs_err file.
|
// Used to print information about locations in the hs_err file.
|
||||||
virtual bool print_location(outputStream* st, void* addr) const;
|
bool print_location(outputStream* st, void* addr) const override;
|
||||||
|
|
||||||
void print_heap_change(const PreGenGCValues& pre_gc_values) const;
|
void print_heap_change(const PreGenGCValues& pre_gc_values) const;
|
||||||
|
|
||||||
@ -306,7 +302,7 @@ public:
|
|||||||
// Return "true" if all generations have reached the
|
// Return "true" if all generations have reached the
|
||||||
// maximal committed limit that they can reach, without a garbage
|
// maximal committed limit that they can reach, without a garbage
|
||||||
// collection.
|
// collection.
|
||||||
virtual bool is_maximal_no_gc() const;
|
virtual bool is_maximal_no_gc() const override;
|
||||||
|
|
||||||
// This function returns the CardTableRS object that allows us to scan
|
// This function returns the CardTableRS object that allows us to scan
|
||||||
// generations in a fully generational heap.
|
// generations in a fully generational heap.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2013, 2021, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2013, 2021, Red Hat, Inc. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -143,29 +144,29 @@ public:
|
|||||||
public:
|
public:
|
||||||
static ShenandoahHeap* heap();
|
static ShenandoahHeap* heap();
|
||||||
|
|
||||||
const char* name() const { return "Shenandoah"; }
|
const char* name() const override { return "Shenandoah"; }
|
||||||
ShenandoahHeap::Name kind() const { return CollectedHeap::Shenandoah; }
|
ShenandoahHeap::Name kind() const override { return CollectedHeap::Shenandoah; }
|
||||||
|
|
||||||
ShenandoahHeap(ShenandoahCollectorPolicy* policy);
|
ShenandoahHeap(ShenandoahCollectorPolicy* policy);
|
||||||
jint initialize();
|
jint initialize() override;
|
||||||
void post_initialize();
|
void post_initialize() override;
|
||||||
void initialize_mode();
|
void initialize_mode();
|
||||||
void initialize_heuristics();
|
void initialize_heuristics();
|
||||||
|
|
||||||
void initialize_serviceability();
|
void initialize_serviceability() override;
|
||||||
|
|
||||||
void print_on(outputStream* st) const;
|
void print_on(outputStream* st) const override;
|
||||||
void print_extended_on(outputStream *st) const;
|
void print_extended_on(outputStream *st) const override;
|
||||||
void print_tracing_info() const;
|
void print_tracing_info() const override;
|
||||||
void print_heap_regions_on(outputStream* st) const;
|
void print_heap_regions_on(outputStream* st) const;
|
||||||
|
|
||||||
void stop();
|
void stop() override;
|
||||||
|
|
||||||
void prepare_for_verify();
|
void prepare_for_verify() override;
|
||||||
void verify(VerifyOption vo);
|
void verify(VerifyOption vo) override;
|
||||||
|
|
||||||
// WhiteBox testing support.
|
// WhiteBox testing support.
|
||||||
bool supports_concurrent_gc_breakpoints() const {
|
bool supports_concurrent_gc_breakpoints() const override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,11 +195,11 @@ public:
|
|||||||
void reset_bytes_allocated_since_gc_start();
|
void reset_bytes_allocated_since_gc_start();
|
||||||
|
|
||||||
size_t min_capacity() const;
|
size_t min_capacity() const;
|
||||||
size_t max_capacity() const;
|
size_t max_capacity() const override;
|
||||||
size_t soft_max_capacity() const;
|
size_t soft_max_capacity() const;
|
||||||
size_t initial_capacity() const;
|
size_t initial_capacity() const;
|
||||||
size_t capacity() const;
|
size_t capacity() const override;
|
||||||
size_t used() const;
|
size_t used() const override;
|
||||||
size_t committed() const;
|
size_t committed() const;
|
||||||
|
|
||||||
void set_soft_max_capacity(size_t v);
|
void set_soft_max_capacity(size_t v);
|
||||||
@ -215,9 +216,9 @@ public:
|
|||||||
void assert_gc_workers(uint nworker) NOT_DEBUG_RETURN;
|
void assert_gc_workers(uint nworker) NOT_DEBUG_RETURN;
|
||||||
|
|
||||||
WorkerThreads* workers() const;
|
WorkerThreads* workers() const;
|
||||||
WorkerThreads* safepoint_workers();
|
WorkerThreads* safepoint_workers() override;
|
||||||
|
|
||||||
void gc_threads_do(ThreadClosure* tcl) const;
|
void gc_threads_do(ThreadClosure* tcl) const override;
|
||||||
|
|
||||||
// ---------- Heap regions handling machinery
|
// ---------- Heap regions handling machinery
|
||||||
//
|
//
|
||||||
@ -417,14 +418,14 @@ private:
|
|||||||
// For exporting to SA
|
// For exporting to SA
|
||||||
int _log_min_obj_alignment_in_bytes;
|
int _log_min_obj_alignment_in_bytes;
|
||||||
public:
|
public:
|
||||||
ShenandoahMonitoringSupport* monitoring_support() { return _monitoring_support; }
|
ShenandoahMonitoringSupport* monitoring_support() { return _monitoring_support; }
|
||||||
GCMemoryManager* cycle_memory_manager() { return &_cycle_memory_manager; }
|
GCMemoryManager* cycle_memory_manager() { return &_cycle_memory_manager; }
|
||||||
GCMemoryManager* stw_memory_manager() { return &_stw_memory_manager; }
|
GCMemoryManager* stw_memory_manager() { return &_stw_memory_manager; }
|
||||||
SoftRefPolicy* soft_ref_policy() { return &_soft_ref_policy; }
|
SoftRefPolicy* soft_ref_policy() override { return &_soft_ref_policy; }
|
||||||
|
|
||||||
GrowableArray<GCMemoryManager*> memory_managers();
|
GrowableArray<GCMemoryManager*> memory_managers() override;
|
||||||
GrowableArray<MemoryPool*> memory_pools();
|
GrowableArray<MemoryPool*> memory_pools() override;
|
||||||
MemoryUsage memory_usage();
|
MemoryUsage memory_usage() override;
|
||||||
GCTracer* tracer();
|
GCTracer* tracer();
|
||||||
ConcurrentGCTimer* gc_timer() const;
|
ConcurrentGCTimer* gc_timer() const;
|
||||||
|
|
||||||
@ -465,53 +466,52 @@ private:
|
|||||||
// and can be stubbed out.
|
// and can be stubbed out.
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
AdaptiveSizePolicy* size_policy() shenandoah_not_implemented_return(NULL);
|
bool is_maximal_no_gc() const override shenandoah_not_implemented_return(false);
|
||||||
bool is_maximal_no_gc() const shenandoah_not_implemented_return(false);
|
|
||||||
|
|
||||||
bool is_in(const void* p) const;
|
bool is_in(const void* p) const override;
|
||||||
|
|
||||||
bool requires_barriers(stackChunkOop obj) const;
|
bool requires_barriers(stackChunkOop obj) const override;
|
||||||
|
|
||||||
MemRegion reserved_region() const { return _reserved; }
|
MemRegion reserved_region() const { return _reserved; }
|
||||||
bool is_in_reserved(const void* addr) const { return _reserved.contains(addr); }
|
bool is_in_reserved(const void* addr) const { return _reserved.contains(addr); }
|
||||||
|
|
||||||
void collect(GCCause::Cause cause);
|
void collect(GCCause::Cause cause) override;
|
||||||
void do_full_collection(bool clear_all_soft_refs);
|
void do_full_collection(bool clear_all_soft_refs) override;
|
||||||
|
|
||||||
// Used for parsing heap during error printing
|
// Used for parsing heap during error printing
|
||||||
HeapWord* block_start(const void* addr) const;
|
HeapWord* block_start(const void* addr) const;
|
||||||
bool block_is_obj(const HeapWord* addr) const;
|
bool block_is_obj(const HeapWord* addr) const;
|
||||||
bool print_location(outputStream* st, void* addr) const;
|
bool print_location(outputStream* st, void* addr) const override;
|
||||||
|
|
||||||
// Used for native heap walkers: heap dumpers, mostly
|
// Used for native heap walkers: heap dumpers, mostly
|
||||||
void object_iterate(ObjectClosure* cl);
|
void object_iterate(ObjectClosure* cl) override;
|
||||||
// Parallel heap iteration support
|
// Parallel heap iteration support
|
||||||
virtual ParallelObjectIteratorImpl* parallel_object_iterator(uint workers);
|
ParallelObjectIteratorImpl* parallel_object_iterator(uint workers) override;
|
||||||
|
|
||||||
// Keep alive an object that was loaded with AS_NO_KEEPALIVE.
|
// Keep alive an object that was loaded with AS_NO_KEEPALIVE.
|
||||||
void keep_alive(oop obj);
|
void keep_alive(oop obj) override;
|
||||||
|
|
||||||
// ---------- Safepoint interface hooks
|
// ---------- Safepoint interface hooks
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
void safepoint_synchronize_begin();
|
void safepoint_synchronize_begin() override;
|
||||||
void safepoint_synchronize_end();
|
void safepoint_synchronize_end() override;
|
||||||
|
|
||||||
// ---------- Code roots handling hooks
|
// ---------- Code roots handling hooks
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
void register_nmethod(nmethod* nm);
|
void register_nmethod(nmethod* nm) override;
|
||||||
void unregister_nmethod(nmethod* nm);
|
void unregister_nmethod(nmethod* nm) override;
|
||||||
void verify_nmethod(nmethod* nm) {}
|
void verify_nmethod(nmethod* nm) override {}
|
||||||
|
|
||||||
// ---------- Pinning hooks
|
// ---------- Pinning hooks
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
// Shenandoah supports per-object (per-region) pinning
|
// Shenandoah supports per-object (per-region) pinning
|
||||||
bool supports_object_pinning() const { return true; }
|
bool supports_object_pinning() const override { return true; }
|
||||||
|
|
||||||
oop pin_object(JavaThread* thread, oop obj);
|
oop pin_object(JavaThread* thread, oop obj) override;
|
||||||
void unpin_object(JavaThread* thread, oop obj);
|
void unpin_object(JavaThread* thread, oop obj) override;
|
||||||
|
|
||||||
void sync_pinned_region_status();
|
void sync_pinned_region_status();
|
||||||
void assert_pinned_region_status() NOT_DEBUG_RETURN;
|
void assert_pinned_region_status() NOT_DEBUG_RETURN;
|
||||||
@ -519,7 +519,7 @@ public:
|
|||||||
// ---------- Concurrent Stack Processing support
|
// ---------- Concurrent Stack Processing support
|
||||||
//
|
//
|
||||||
public:
|
public:
|
||||||
bool uses_stack_watermark_barrier() const { return true; }
|
bool uses_stack_watermark_barrier() const override { return true; }
|
||||||
|
|
||||||
// ---------- Allocation support
|
// ---------- Allocation support
|
||||||
//
|
//
|
||||||
@ -531,20 +531,20 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
HeapWord* allocate_memory(ShenandoahAllocRequest& request);
|
HeapWord* allocate_memory(ShenandoahAllocRequest& request);
|
||||||
HeapWord* mem_allocate(size_t size, bool* what);
|
HeapWord* mem_allocate(size_t size, bool* what) override;
|
||||||
MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
|
MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
|
||||||
size_t size,
|
size_t size,
|
||||||
Metaspace::MetadataType mdtype);
|
Metaspace::MetadataType mdtype) override;
|
||||||
|
|
||||||
void notify_mutator_alloc_words(size_t words, bool waste);
|
void notify_mutator_alloc_words(size_t words, bool waste);
|
||||||
|
|
||||||
HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size);
|
HeapWord* allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) override;
|
||||||
size_t tlab_capacity(Thread *thr) const;
|
size_t tlab_capacity(Thread *thr) const override;
|
||||||
size_t unsafe_max_tlab_alloc(Thread *thread) const;
|
size_t unsafe_max_tlab_alloc(Thread *thread) const override;
|
||||||
size_t max_tlab_size() const;
|
size_t max_tlab_size() const override;
|
||||||
size_t tlab_used(Thread* ignored) const;
|
size_t tlab_used(Thread* ignored) const override;
|
||||||
|
|
||||||
void ensure_parsability(bool retire_labs);
|
void ensure_parsability(bool retire_labs) override;
|
||||||
|
|
||||||
void labs_make_parsable();
|
void labs_make_parsable();
|
||||||
void tlabs_retire(bool resize);
|
void tlabs_retire(bool resize);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -50,79 +50,79 @@ private:
|
|||||||
ZStat* _stat;
|
ZStat* _stat;
|
||||||
ZRuntimeWorkers _runtime_workers;
|
ZRuntimeWorkers _runtime_workers;
|
||||||
|
|
||||||
virtual HeapWord* allocate_new_tlab(size_t min_size,
|
HeapWord* allocate_new_tlab(size_t min_size,
|
||||||
size_t requested_size,
|
size_t requested_size,
|
||||||
size_t* actual_size);
|
size_t* actual_size) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ZCollectedHeap* heap();
|
static ZCollectedHeap* heap();
|
||||||
|
|
||||||
ZCollectedHeap();
|
ZCollectedHeap();
|
||||||
virtual Name kind() const;
|
Name kind() const override;
|
||||||
virtual const char* name() const;
|
const char* name() const override;
|
||||||
virtual jint initialize();
|
jint initialize() override;
|
||||||
virtual void initialize_serviceability();
|
void initialize_serviceability() override;
|
||||||
virtual void stop();
|
void stop() override;
|
||||||
|
|
||||||
virtual SoftRefPolicy* soft_ref_policy();
|
SoftRefPolicy* soft_ref_policy() override;
|
||||||
|
|
||||||
virtual size_t max_capacity() const;
|
size_t max_capacity() const override;
|
||||||
virtual size_t capacity() const;
|
size_t capacity() const override;
|
||||||
virtual size_t used() const;
|
size_t used() const override;
|
||||||
virtual size_t unused() const;
|
size_t unused() const override;
|
||||||
|
|
||||||
virtual bool is_maximal_no_gc() const;
|
bool is_maximal_no_gc() const override;
|
||||||
virtual bool is_in(const void* p) const;
|
bool is_in(const void* p) const override;
|
||||||
virtual bool requires_barriers(stackChunkOop obj) const;
|
bool requires_barriers(stackChunkOop obj) const override;
|
||||||
|
|
||||||
virtual oop array_allocate(Klass* klass, size_t size, int length, bool do_zero, TRAPS);
|
oop array_allocate(Klass* klass, size_t size, int length, bool do_zero, TRAPS) override;
|
||||||
virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
|
HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded) override;
|
||||||
virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
|
MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
|
||||||
size_t size,
|
size_t size,
|
||||||
Metaspace::MetadataType mdtype);
|
Metaspace::MetadataType mdtype) override;
|
||||||
virtual void collect(GCCause::Cause cause);
|
void collect(GCCause::Cause cause) override;
|
||||||
virtual void collect_as_vm_thread(GCCause::Cause cause);
|
void collect_as_vm_thread(GCCause::Cause cause) override;
|
||||||
virtual void do_full_collection(bool clear_all_soft_refs);
|
void do_full_collection(bool clear_all_soft_refs) override;
|
||||||
|
|
||||||
virtual size_t tlab_capacity(Thread* thr) const;
|
size_t tlab_capacity(Thread* thr) const override;
|
||||||
virtual size_t tlab_used(Thread* thr) const;
|
size_t tlab_used(Thread* thr) const override;
|
||||||
virtual size_t max_tlab_size() const;
|
size_t max_tlab_size() const override;
|
||||||
virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
|
size_t unsafe_max_tlab_alloc(Thread* thr) const override;
|
||||||
|
|
||||||
virtual bool uses_stack_watermark_barrier() const;
|
bool uses_stack_watermark_barrier() const override;
|
||||||
|
|
||||||
virtual MemoryUsage memory_usage();
|
MemoryUsage memory_usage() override;
|
||||||
virtual GrowableArray<GCMemoryManager*> memory_managers();
|
GrowableArray<GCMemoryManager*> memory_managers() override;
|
||||||
virtual GrowableArray<MemoryPool*> memory_pools();
|
GrowableArray<MemoryPool*> memory_pools() override;
|
||||||
|
|
||||||
virtual void object_iterate(ObjectClosure* cl);
|
void object_iterate(ObjectClosure* cl) override;
|
||||||
virtual ParallelObjectIteratorImpl* parallel_object_iterator(uint nworkers);
|
ParallelObjectIteratorImpl* parallel_object_iterator(uint nworkers) override;
|
||||||
|
|
||||||
virtual void keep_alive(oop obj);
|
void keep_alive(oop obj) override;
|
||||||
|
|
||||||
virtual void register_nmethod(nmethod* nm);
|
void register_nmethod(nmethod* nm) override;
|
||||||
virtual void unregister_nmethod(nmethod* nm);
|
void unregister_nmethod(nmethod* nm) override;
|
||||||
virtual void verify_nmethod(nmethod* nmethod);
|
void verify_nmethod(nmethod* nmethod) override;
|
||||||
|
|
||||||
virtual WorkerThreads* safepoint_workers();
|
WorkerThreads* safepoint_workers() override;
|
||||||
|
|
||||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
void gc_threads_do(ThreadClosure* tc) const override;
|
||||||
|
|
||||||
virtual VirtualSpaceSummary create_heap_space_summary();
|
VirtualSpaceSummary create_heap_space_summary() override;
|
||||||
|
|
||||||
virtual void safepoint_synchronize_begin();
|
void safepoint_synchronize_begin() override;
|
||||||
virtual void safepoint_synchronize_end();
|
void safepoint_synchronize_end() override;
|
||||||
|
|
||||||
virtual void print_on(outputStream* st) const;
|
void print_on(outputStream* st) const override;
|
||||||
virtual void print_on_error(outputStream* st) const;
|
void print_on_error(outputStream* st) const override;
|
||||||
virtual void print_extended_on(outputStream* st) const;
|
void print_extended_on(outputStream* st) const override;
|
||||||
virtual void print_tracing_info() const;
|
void print_tracing_info() const override;
|
||||||
virtual bool print_location(outputStream* st, void* addr) const;
|
bool print_location(outputStream* st, void* addr) const override;
|
||||||
|
|
||||||
virtual void prepare_for_verify();
|
void prepare_for_verify() override;
|
||||||
virtual void verify(VerifyOption option /* ignored */);
|
void verify(VerifyOption option /* ignored */) override;
|
||||||
virtual bool is_oop(oop object) const;
|
bool is_oop(oop object) const override;
|
||||||
virtual bool supports_concurrent_gc_breakpoints() const;
|
bool supports_concurrent_gc_breakpoints() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_GC_Z_ZCOLLECTEDHEAP_HPP
|
#endif // SHARE_GC_Z_ZCOLLECTEDHEAP_HPP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user