< prev index next >
src/hotspot/share/gc/z/zRelocate.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -29,32 +29,26 @@
#include "gc/z/zPage.hpp"
#include "gc/z/zRelocate.hpp"
#include "gc/z/zRelocationSet.inline.hpp"
#include "gc/z/zRootsIterator.hpp"
#include "gc/z/zTask.hpp"
+#include "gc/z/zThreadLocalAllocBuffer.hpp"
#include "gc/z/zWorkers.hpp"
ZRelocate::ZRelocate(ZWorkers* workers) :
_workers(workers) {}
class ZRelocateRootsIteratorClosure : public ZRootsIteratorClosure {
-private:
- static void remap_address(HeapWord** p) {
- *p = (HeapWord*)ZAddress::good_or_null((uintptr_t)*p);
- }
-
public:
virtual void do_thread(Thread* thread) {
ZRootsIteratorClosure::do_thread(thread);
// Update thread local address bad mask
ZThreadLocalData::set_address_bad_mask(thread, ZAddressBadMask);
// Remap TLAB
- if (UseTLAB && thread->is_Java_thread()) {
- thread->tlab().addresses_do(remap_address);
- }
+ ZThreadLocalAllocBuffer::remap(thread);
}
virtual void do_oop(oop* p) {
ZBarrier::relocate_barrier_on_root_oop_field(p);
}
< prev index next >