mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8246718: ParallelGC should not check for forward objects for copy task queue
Prefetch task's oop markword and unconditionally push task. Reviewed-by: tschatzl, eosterlund
This commit is contained in:
parent
27e168677f
commit
0bf3ba402b
2 changed files with 4 additions and 20 deletions
|
@ -99,7 +99,6 @@ class PSPromotionManager {
|
||||||
static MutableSpace* young_space() { return _young_space; }
|
static MutableSpace* young_space() { return _young_space; }
|
||||||
|
|
||||||
inline static PSPromotionManager* manager_array(uint index);
|
inline static PSPromotionManager* manager_array(uint index);
|
||||||
template <class T> inline void claim_or_forward_internal_depth(T* p);
|
|
||||||
|
|
||||||
template <class T> void process_array_chunk_work(oop obj,
|
template <class T> void process_array_chunk_work(oop obj,
|
||||||
int start, int end);
|
int start, int end);
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "memory/iterator.inline.hpp"
|
#include "memory/iterator.inline.hpp"
|
||||||
#include "oops/access.inline.hpp"
|
#include "oops/access.inline.hpp"
|
||||||
#include "oops/oop.inline.hpp"
|
#include "oops/oop.inline.hpp"
|
||||||
|
#include "runtime/prefetch.inline.hpp"
|
||||||
|
|
||||||
inline PSPromotionManager* PSPromotionManager::manager_array(uint index) {
|
inline PSPromotionManager* PSPromotionManager::manager_array(uint index) {
|
||||||
assert(_manager_array != NULL, "access of NULL manager_array");
|
assert(_manager_array != NULL, "access of NULL manager_array");
|
||||||
|
@ -47,29 +48,13 @@ inline void PSPromotionManager::push_depth(ScannerTask task) {
|
||||||
claimed_stack_depth()->push(task);
|
claimed_stack_depth()->push(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
|
||||||
inline void PSPromotionManager::claim_or_forward_internal_depth(T* p) {
|
|
||||||
if (p != NULL) { // XXX: error if p != NULL here
|
|
||||||
oop o = RawAccess<IS_NOT_NULL>::oop_load(p);
|
|
||||||
if (o->is_forwarded()) {
|
|
||||||
o = o->forwardee();
|
|
||||||
// Card mark
|
|
||||||
if (PSScavenge::is_obj_in_young(o)) {
|
|
||||||
PSScavenge::card_table()->inline_write_ref_field_gc(p, o);
|
|
||||||
}
|
|
||||||
RawAccess<IS_NOT_NULL>::oop_store(p, o);
|
|
||||||
} else {
|
|
||||||
push_depth(ScannerTask(p));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void PSPromotionManager::claim_or_forward_depth(T* p) {
|
inline void PSPromotionManager::claim_or_forward_depth(T* p) {
|
||||||
assert(should_scavenge(p, true), "revisiting object?");
|
assert(should_scavenge(p, true), "revisiting object?");
|
||||||
assert(ParallelScavengeHeap::heap()->is_in(p), "pointer outside heap");
|
assert(ParallelScavengeHeap::heap()->is_in(p), "pointer outside heap");
|
||||||
|
oop obj = RawAccess<IS_NOT_NULL>::oop_load(p);
|
||||||
claim_or_forward_internal_depth(p);
|
Prefetch::write(obj->mark_addr_raw(), 0);
|
||||||
|
push_depth(ScannerTask(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PSPromotionManager::promotion_trace_event(oop new_obj, oop old_obj,
|
inline void PSPromotionManager::promotion_trace_event(oop new_obj, oop old_obj,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue