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 *
23 */
24
25 #ifndef SHARE_RUNTIME_THREADSMR_INLINE_HPP
26 #define SHARE_RUNTIME_THREADSMR_INLINE_HPP
27
28 #include "runtime/atomic.hpp"
29 #include "runtime/prefetch.inline.hpp"
30 #include "runtime/thread.inline.hpp"
31 #include "runtime/threadSMR.hpp"
32
33 // Devirtualize known thread closure types.
34 template <class T>
35 inline void ThreadsList::threads_do_dispatch(T *cl, JavaThread *const thread) const {
36 cl->T::do_thread(thread);
37 }
38
39 template <>
40 inline void ThreadsList::threads_do_dispatch<ThreadClosure>(ThreadClosure *cl, JavaThread *const thread) const {
41 cl->do_thread(thread);
42 }
43
44 template <class T>
45 inline void ThreadsList::threads_do(T *cl) const {
46 const intx scan_interval = PrefetchScanIntervalInBytes;
47 JavaThread *const *const end = _threads + _length;
48 for (JavaThread *const *current_p = _threads; current_p != end; current_p++) {
|
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 *
23 */
24
25 #ifndef SHARE_RUNTIME_THREADSMR_INLINE_HPP
26 #define SHARE_RUNTIME_THREADSMR_INLINE_HPP
27
28 #include "runtime/atomic.hpp"
29 #include "memory/iterator.hpp"
30 #include "runtime/prefetch.inline.hpp"
31 #include "runtime/thread.inline.hpp"
32 #include "runtime/threadSMR.hpp"
33
34 // Devirtualize known thread closure types.
35 template <class T>
36 inline void ThreadsList::threads_do_dispatch(T *cl, JavaThread *const thread) const {
37 cl->T::do_thread(thread);
38 }
39
40 template <>
41 inline void ThreadsList::threads_do_dispatch<ThreadClosure>(ThreadClosure *cl, JavaThread *const thread) const {
42 cl->do_thread(thread);
43 }
44
45 template <class T>
46 inline void ThreadsList::threads_do(T *cl) const {
47 const intx scan_interval = PrefetchScanIntervalInBytes;
48 JavaThread *const *const end = _threads + _length;
49 for (JavaThread *const *current_p = _threads; current_p != end; current_p++) {
|