8217213: shenandoahTaskQueue.hpp includes .inline.hpp file

Reviewed-by: shade, tschatzl
This commit is contained in:
Zhengyu Gu 2019-01-17 08:48:56 -05:00
parent 419c048dc3
commit 954f8acb59
6 changed files with 25 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@ -24,7 +24,9 @@
#include "precompiled.hpp"
#include "gc/shenandoah/heuristics/shenandoahTraversalHeuristics.hpp"
#include "gc/shenandoah/shenandoahCollectionSet.hpp"
#include "gc/shenandoah/shenandoahFreeSet.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeuristics.hpp"
#include "gc/shenandoah/shenandoahTraversalGC.hpp"
#include "logging/log.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2018, 2019, Red Hat, Inc. 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
@ -27,7 +27,7 @@
#include "gc/shared/workerPolicy.hpp"
#include "gc/shenandoah/shenandoahArguments.hpp"
#include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.hpp"
#include "utilities/defaultStream.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2016, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@ -23,8 +23,8 @@
#include "precompiled.hpp"
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.inline.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2016, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@ -25,7 +25,6 @@
#define SHARE_GC_SHENANDOAH_SHENANDOAHTASKQUEUE_HPP
#include "gc/shared/owstTaskTerminator.hpp"
#include "gc/shared/taskqueue.hpp"
#include "gc/shared/taskqueue.inline.hpp"
#include "memory/allocation.hpp"
#include "runtime/mutex.hpp"
#include "runtime/thread.hpp"
@ -46,11 +45,7 @@ public:
// Attempt to pop from the queue. Returns true on success.
inline bool pop(E &t);
inline void clear() {
_buf_empty = true;
taskqueue_t::set_empty();
taskqueue_t::overflow_stack()->clear();
}
inline void clear();
inline bool is_empty() const {
return _buf_empty && taskqueue_t::is_empty();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2016, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@ -24,11 +24,12 @@
#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHTASKQUEUE_INLINE_HPP
#define SHARE_GC_SHENANDOAH_SHENANDOAHTASKQUEUE_INLINE_HPP
#include "gc/shared/taskqueue.inline.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.hpp"
#include "utilities/stack.inline.hpp"
template <class E, MEMFLAGS F, unsigned int N>
bool BufferedOverflowTaskQueue<E, F, N>::pop(E &t)
{
bool BufferedOverflowTaskQueue<E, F, N>::pop(E &t) {
if (!_buf_empty) {
t = _elem;
_buf_empty = true;
@ -43,8 +44,7 @@ bool BufferedOverflowTaskQueue<E, F, N>::pop(E &t)
}
template <class E, MEMFLAGS F, unsigned int N>
inline bool BufferedOverflowTaskQueue<E, F, N>::push(E t)
{
inline bool BufferedOverflowTaskQueue<E, F, N>::push(E t) {
if (_buf_empty) {
_elem = t;
_buf_empty = false;
@ -56,4 +56,12 @@ inline bool BufferedOverflowTaskQueue<E, F, N>::push(E t)
return true;
}
template <class E, MEMFLAGS F, unsigned int N>
void BufferedOverflowTaskQueue<E, F, N>::clear() {
_buf_empty = true;
taskqueue_t::set_empty();
taskqueue_t::overflow_stack()->clear();
}
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHTASKQUEUE_INLINE_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
*
* 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
@ -29,7 +29,7 @@
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahRootProcessor.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.hpp"
#include "gc/shenandoah/shenandoahTaskqueue.inline.hpp"
#include "gc/shenandoah/shenandoahUtils.hpp"
#include "gc/shenandoah/shenandoahVerifier.hpp"
#include "memory/allocation.hpp"