1 /*
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
57 static ZCollectedHeap* heap();
58
59 ZCollectedHeap(ZCollectorPolicy* policy);
60 virtual Name kind() const;
61 virtual const char* name() const;
62 virtual jint initialize();
63 virtual void initialize_serviceability();
64 virtual void stop();
65
66 virtual CollectorPolicy* collector_policy() const;
67 virtual SoftRefPolicy* soft_ref_policy();
68
69 virtual size_t max_capacity() const;
70 virtual size_t capacity() const;
71 virtual size_t used() const;
72
73 virtual bool is_maximal_no_gc() const;
74 virtual bool is_scavengable(oop obj);
75 virtual bool is_in(const void* p) const;
76 virtual bool is_in_closed_subset(const void* p) const;
77
78 virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
79
80 virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
81 virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
82 size_t size,
83 Metaspace::MetadataType mdtype);
84 virtual void collect(GCCause::Cause cause);
85 virtual void collect_as_vm_thread(GCCause::Cause cause);
86 virtual void do_full_collection(bool clear_all_soft_refs);
87
88 virtual bool supports_tlab_allocation() const;
89 virtual size_t tlab_capacity(Thread* thr) const;
90 virtual size_t tlab_used(Thread* thr) const;
91 virtual size_t max_tlab_size() const;
92 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
93
94 virtual bool can_elide_tlab_store_barriers() const;
95 virtual bool can_elide_initializing_store_barrier(oop new_obj);
96 virtual bool card_mark_must_follow_store() const;
97
98 virtual GrowableArray<GCMemoryManager*> memory_managers();
|
1 /*
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
57 static ZCollectedHeap* heap();
58
59 ZCollectedHeap(ZCollectorPolicy* policy);
60 virtual Name kind() const;
61 virtual const char* name() const;
62 virtual jint initialize();
63 virtual void initialize_serviceability();
64 virtual void stop();
65
66 virtual CollectorPolicy* collector_policy() const;
67 virtual SoftRefPolicy* soft_ref_policy();
68
69 virtual size_t max_capacity() const;
70 virtual size_t capacity() const;
71 virtual size_t used() const;
72
73 virtual bool is_maximal_no_gc() const;
74 virtual bool is_scavengable(oop obj);
75 virtual bool is_in(const void* p) const;
76 virtual bool is_in_closed_subset(const void* p) const;
77
78 virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
79 virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
80 size_t size,
81 Metaspace::MetadataType mdtype);
82 virtual void collect(GCCause::Cause cause);
83 virtual void collect_as_vm_thread(GCCause::Cause cause);
84 virtual void do_full_collection(bool clear_all_soft_refs);
85
86 virtual bool supports_tlab_allocation() const;
87 virtual size_t tlab_capacity(Thread* thr) const;
88 virtual size_t tlab_used(Thread* thr) const;
89 virtual size_t max_tlab_size() const;
90 virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
91
92 virtual bool can_elide_tlab_store_barriers() const;
93 virtual bool can_elide_initializing_store_barrier(oop new_obj);
94 virtual bool card_mark_must_follow_store() const;
95
96 virtual GrowableArray<GCMemoryManager*> memory_managers();
|