|
36 | 36 | #include "oops/access.inline.hpp"
|
37 | 37 | #include "oops/oop.inline.hpp"
|
38 | 38 | #include "runtime/prefetch.inline.hpp"
|
| 39 | +#include "utilities/globalDefinitions.hpp" |
| 40 | +#include "utilities/macros.hpp" |
| 41 | + |
| 42 | +// In fastdebug builds the code size can get out of hand, potentially |
| 43 | +// tripping over compiler limits (which may be bugs, but nevertheless |
| 44 | +// need to be taken into consideration). A side benefit of limiting |
| 45 | +// inlining is that we get more call frames that might aid debugging. |
| 46 | +// And the fastdebug compile time for this file is much reduced. |
| 47 | +// Explicit NOINLINE to block ATTRIBUTE_FLATTENing. |
| 48 | +#define MAYBE_INLINE_EVACUATION NOT_DEBUG(inline) DEBUG_ONLY(NOINLINE) |
39 | 49 |
|
40 | 50 | G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h,
|
41 | 51 | G1RedirtyCardsQueueSet* rdcqs,
|
@@ -155,7 +165,9 @@ void G1ParScanThreadState::verify_task(ScannerTask task) const {
|
155 | 165 | }
|
156 | 166 | #endif // ASSERT
|
157 | 167 |
|
158 |
| -template <class T> void G1ParScanThreadState::do_oop_evac(T* p) { |
| 168 | +template <class T> |
| 169 | +MAYBE_INLINE_EVACUATION |
| 170 | +void G1ParScanThreadState::do_oop_evac(T* p) { |
159 | 171 | // Reference should not be NULL here as such are never pushed to the task queue.
|
160 | 172 | oop obj = RawAccess<IS_NOT_NULL>::oop_load(p);
|
161 | 173 |
|
@@ -194,6 +206,7 @@ template <class T> void G1ParScanThreadState::do_oop_evac(T* p) {
|
194 | 206 | }
|
195 | 207 | }
|
196 | 208 |
|
| 209 | +MAYBE_INLINE_EVACUATION |
197 | 210 | void G1ParScanThreadState::do_partial_array(PartialArrayScanTask task) {
|
198 | 211 | oop from_obj = task.to_source_array();
|
199 | 212 |
|
@@ -243,6 +256,7 @@ void G1ParScanThreadState::do_partial_array(PartialArrayScanTask task) {
|
243 | 256 | to_obj_array->oop_iterate_range(&_scanner, start, end);
|
244 | 257 | }
|
245 | 258 |
|
| 259 | +MAYBE_INLINE_EVACUATION |
246 | 260 | void G1ParScanThreadState::dispatch_task(ScannerTask task) {
|
247 | 261 | verify_task(task);
|
248 | 262 | if (task.is_narrow_oop_ptr()) {
|
@@ -388,6 +402,7 @@ void G1ParScanThreadState::undo_allocation(G1HeapRegionAttr dest_attr,
|
388 | 402 |
|
389 | 403 | // Private inline function, for direct internal use and providing the
|
390 | 404 | // implementation of the public not-inline function.
|
| 405 | +MAYBE_INLINE_EVACUATION |
391 | 406 | oop G1ParScanThreadState::do_copy_to_survivor_space(G1HeapRegionAttr const region_attr,
|
392 | 407 | oop const old,
|
393 | 408 | markWord const old_mark) {
|
|
0 commit comments