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 */
102 // Workers
103 uint nconcurrent_worker_threads() const;
104 uint nconcurrent_no_boost_worker_threads() const;
105 void set_boost_worker_threads(bool boost);
106 void worker_threads_do(ThreadClosure* tc) const;
107 void print_worker_threads_on(outputStream* st) const;
108
109 // Reference processing
110 ReferenceDiscoverer* reference_discoverer();
111 void set_soft_reference_policy(bool clear);
112
113 // Non-strong reference processing
114 void process_non_strong_references();
115
116 // Page allocation
117 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags);
118 void undo_alloc_page(ZPage* page);
119 void free_page(ZPage* page, bool reclaimed);
120
121 // Uncommit memory
122 uint64_t uncommit(uint64_t delay);
123
124 // Object allocation
125 uintptr_t alloc_tlab(size_t size);
126 uintptr_t alloc_object(size_t size);
127 uintptr_t alloc_object_for_relocation(size_t size);
128 void undo_alloc_object_for_relocation(uintptr_t addr, size_t size);
129 bool is_alloc_stalled() const;
130 void check_out_of_memory();
131
132 // Marking
133 bool is_object_live(uintptr_t addr) const;
134 bool is_object_strongly_live(uintptr_t addr) const;
135 template <bool follow, bool finalizable, bool publish> void mark_object(uintptr_t addr);
136 void mark_start();
137 void mark(bool initial);
138 void mark_flush_and_free(Thread* thread);
139 bool mark_end();
140 void keep_alive(oop obj);
141
142 // Relocation set
|
1 /*
2 * Copyright (c) 2015, 2020, 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 */
102 // Workers
103 uint nconcurrent_worker_threads() const;
104 uint nconcurrent_no_boost_worker_threads() const;
105 void set_boost_worker_threads(bool boost);
106 void worker_threads_do(ThreadClosure* tc) const;
107 void print_worker_threads_on(outputStream* st) const;
108
109 // Reference processing
110 ReferenceDiscoverer* reference_discoverer();
111 void set_soft_reference_policy(bool clear);
112
113 // Non-strong reference processing
114 void process_non_strong_references();
115
116 // Page allocation
117 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags);
118 void undo_alloc_page(ZPage* page);
119 void free_page(ZPage* page, bool reclaimed);
120
121 // Uncommit memory
122 uint64_t uncommit();
123 void uncommit_cancel();
124
125 // Object allocation
126 uintptr_t alloc_tlab(size_t size);
127 uintptr_t alloc_object(size_t size);
128 uintptr_t alloc_object_for_relocation(size_t size);
129 void undo_alloc_object_for_relocation(uintptr_t addr, size_t size);
130 bool is_alloc_stalled() const;
131 void check_out_of_memory();
132
133 // Marking
134 bool is_object_live(uintptr_t addr) const;
135 bool is_object_strongly_live(uintptr_t addr) const;
136 template <bool follow, bool finalizable, bool publish> void mark_object(uintptr_t addr);
137 void mark_start();
138 void mark(bool initial);
139 void mark_flush_and_free(Thread* thread);
140 bool mark_end();
141 void keep_alive(oop obj);
142
143 // Relocation set
|