< prev index next >

src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp

Print this page
rev 47287 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
rev 47289 : eosterlund, stefank CR - refactor code into threadSMR.cpp and threadSMR.hpp

*** 1,7 **** /* ! * Copyright (c) 1999, 2015, 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. --- 1,7 ---- /* ! * Copyright (c) 1999, 2017, 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.
*** 28,37 **** --- 28,38 ---- #include "logging/log.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/thread.inline.hpp" + #include "runtime/threadSMR.hpp" #include "utilities/copy.hpp" // Thread-Local Edens support // static member initialization
*** 46,59 **** } void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() { global_stats()->initialize(); ! for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) { thread->tlab().accumulate_statistics(); thread->tlab().initialize_statistics(); } // Publish new stats if some allocation occurred. if (global_stats()->allocation() != 0) { global_stats()->publish(); global_stats()->print(); --- 47,64 ---- } void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() { global_stats()->initialize(); ! { ! ThreadsListHandle tlh; ! JavaThreadIterator jti(tlh.list()); ! for (JavaThread *thread = jti.first(); thread != NULL; thread = jti.next()) { thread->tlab().accumulate_statistics(); thread->tlab().initialize_statistics(); } + } // Publish new stats if some allocation occurred. if (global_stats()->allocation() != 0) { global_stats()->publish(); global_stats()->print();
*** 128,138 **** "TLAB must be reset"); } void ThreadLocalAllocBuffer::resize_all_tlabs() { if (ResizeTLAB) { ! for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) { thread->tlab().resize(); } } } --- 133,145 ---- "TLAB must be reset"); } void ThreadLocalAllocBuffer::resize_all_tlabs() { if (ResizeTLAB) { ! ThreadsListHandle tlh; ! JavaThreadIterator jti(tlh.list()); ! for (JavaThread *thread = jti.first(); thread != NULL; thread = jti.next()) { thread->tlab().resize(); } } }
< prev index next >