/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "memory/genOopClosures.hpp"
#include "memory/generation.hpp"
#include "utilities/taskqueue.hpp"
// A BufferingOops closure tries to separate out the cost of finding roots
// from the cost of applying closures to them. It maintains an array of
// ref-containing locations. Until the array is full, applying the closure
// to an oop* merely records that location in the array. Since this
// closure app cost is small, an elapsed timer can approximately attribute
// all of this cost to the cost of finding the roots. When the array fills
// up, the wrapped closure is applied to all elements, keeping track of
// this elapsed time of this process, and leaving the array empty.
// The caller must be sure to call "done" to process any unprocessed
// buffered entriess.
class Generation;
class HeapRegion;
protected:
enum PrivateConstants {
};
double _closure_app_seconds;
void process_buffer () {
} else {
}
}
}
template <class T> inline void do_oop_work(T* p) {
if (_buffer_curr == _buffer_top) {
}
*_buffer_curr = new_ref;
++_buffer_curr;
}
public:
void done () {
if (_buffer_curr > _buffer) {
}
}
double closure_app_seconds () {
return _closure_app_seconds;
}
_closure_app_seconds(0.0) { }
};
protected:
template <class T> inline void do_oop_work(T* p) {
}
public:
void done() {
}
double closure_app_seconds () {
return _boc.closure_app_seconds();
}
}
void reset_generation() {
// Make sure we finish the current work with the current generation.
_oc->reset_generation();
}
};
private:
enum PrivateConstants {
};
double _closure_app_seconds;
void process_buffer () {
"the two lengths should be the same");
}
} else {
}
++hr_curr;
}
}
public:
template <class T> void do_oop_work(T* p) {
if (_buffer_curr == _buffer_top) {
}
*_buffer_curr = new_ref;
++_buffer_curr;
++_hr_curr;
}
void done () {
if (_buffer_curr > _buffer) {
}
}
double closure_app_seconds () {
return _closure_app_seconds;
}
_closure_app_seconds(0.0) { }
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_BUFFERINGOOPCLOSURE_HPP