< prev index next >
src/hotspot/share/gc/z/zMark.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.
@@ -30,13 +30,13 @@
#include "gc/z/zOopClosures.inline.hpp"
#include "gc/z/zPage.hpp"
#include "gc/z/zPageTable.inline.hpp"
#include "gc/z/zRootsIterator.hpp"
#include "gc/z/zStat.hpp"
-#include "gc/z/zStatTLAB.hpp"
#include "gc/z/zTask.hpp"
#include "gc/z/zThread.hpp"
+#include "gc/z/zThreadLocalAllocBuffer.hpp"
#include "gc/z/zUtils.inline.hpp"
#include "gc/z/zWorkers.inline.hpp"
#include "logging/log.hpp"
#include "memory/iterator.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
@@ -117,36 +117,27 @@
}
}
}
class ZMarkRootsIteratorClosure : public ZRootsIteratorClosure {
-private:
- static void fixup_address(HeapWord** p) {
- *p = (HeapWord*)ZAddress::good_or_null((uintptr_t)*p);
- }
-
public:
ZMarkRootsIteratorClosure() {
- ZStatTLAB::reset();
+ ZThreadLocalAllocBuffer::reset_statistics();
}
~ZMarkRootsIteratorClosure() {
- ZStatTLAB::publish();
+ ZThreadLocalAllocBuffer::publish_statistics();
}
virtual void do_thread(Thread* thread) {
ZRootsIteratorClosure::do_thread(thread);
// Update thread local address bad mask
ZThreadLocalData::set_address_bad_mask(thread, ZAddressBadMask);
// Retire TLAB
- if (UseTLAB && thread->is_Java_thread()) {
- thread->tlab().addresses_do(fixup_address);
- thread->tlab().retire(ZStatTLAB::get());
- thread->tlab().resize();
- }
+ ZThreadLocalAllocBuffer::retire(thread);
}
virtual void do_oop(oop* p) {
ZBarrier::mark_barrier_on_root_oop_field(p);
}
< prev index next >