1 /*
2 * Copyright (c) 1997, 2016, 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 *
308 // this call returns "NULL" for that thread; any other thread has the
309 // value of the forwarding pointer returned and does not modify "this".
310 inline oop forward_to_atomic(oop p);
311 #endif // INCLUDE_ALL_GCS
312
313 inline oop forwardee() const;
314
315 // Age of object during scavenge
316 inline uint age() const;
317 inline void incr_age();
318
319 // mark-sweep support
320 void follow_body(int begin, int end);
321
322 // Fast access to barrier set
323 static BarrierSet* bs() { return _bs; }
324 static void set_bs(BarrierSet* bs) { _bs = bs; }
325
326 // Garbage Collection support
327
328 // Mark Sweep
329 // Adjust all pointers in this object to point at it's forwarded location and
330 // return the size of this oop. This is used by the MarkSweep collector.
331 inline int ms_adjust_pointers();
332 #if INCLUDE_ALL_GCS
333 // Parallel Compact
334 inline void pc_follow_contents(ParCompactionManager* cm);
335 inline void pc_update_contents(ParCompactionManager* cm);
336 // Parallel Scavenge
337 inline void ps_push_contents(PSPromotionManager* pm);
338 #endif
339
340
341 // iterators, returns size of object
342 #define OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
343 inline void oop_iterate(OopClosureType* blk); \
344 inline void oop_iterate(OopClosureType* blk, MemRegion mr); // Only in mr.
345
346 ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
347 ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
348
349 #define OOP_ITERATE_SIZE_DECL(OopClosureType, nv_suffix) \
350 inline int oop_iterate_size(OopClosureType* blk); \
351 inline int oop_iterate_size(OopClosureType* blk, MemRegion mr); // Only in mr.
|
1 /*
2 * Copyright (c) 1997, 2017, 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 *
308 // this call returns "NULL" for that thread; any other thread has the
309 // value of the forwarding pointer returned and does not modify "this".
310 inline oop forward_to_atomic(oop p);
311 #endif // INCLUDE_ALL_GCS
312
313 inline oop forwardee() const;
314
315 // Age of object during scavenge
316 inline uint age() const;
317 inline void incr_age();
318
319 // mark-sweep support
320 void follow_body(int begin, int end);
321
322 // Fast access to barrier set
323 static BarrierSet* bs() { return _bs; }
324 static void set_bs(BarrierSet* bs) { _bs = bs; }
325
326 // Garbage Collection support
327
328 #if INCLUDE_ALL_GCS
329 // Parallel Compact
330 inline void pc_follow_contents(ParCompactionManager* cm);
331 inline void pc_update_contents(ParCompactionManager* cm);
332 // Parallel Scavenge
333 inline void ps_push_contents(PSPromotionManager* pm);
334 #endif
335
336
337 // iterators, returns size of object
338 #define OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
339 inline void oop_iterate(OopClosureType* blk); \
340 inline void oop_iterate(OopClosureType* blk, MemRegion mr); // Only in mr.
341
342 ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_ITERATE_DECL)
343 ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_ITERATE_DECL)
344
345 #define OOP_ITERATE_SIZE_DECL(OopClosureType, nv_suffix) \
346 inline int oop_iterate_size(OopClosureType* blk); \
347 inline int oop_iterate_size(OopClosureType* blk, MemRegion mr); // Only in mr.
|