--- a/hotspot/src/os/linux/vm/os_linux.cpp Fri Aug 14 15:08:55 2015 -0400
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Fri Aug 14 19:23:27 2015 +0000
@@ -5785,9 +5785,11 @@
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
} else {
+ // must capture correct index before unlocking
+ int index = _cur_index;
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
- status = pthread_cond_signal(&_cond[_cur_index]);
+ status = pthread_cond_signal(&_cond[index]);
assert(status == 0, "invariant");
}
} else {
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Fri Aug 14 15:08:55 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Fri Aug 14 19:23:27 2015 +0000
@@ -3088,29 +3088,6 @@
}
#endif
-template<bool scan>
-inline void CMTask::process_grey_object(oop obj) {
- assert(scan || obj->is_typeArray(), "Skipping scan of grey non-typeArray");
- assert(_nextMarkBitMap->isMarked((HeapWord*) obj), "invariant");
-
- if (_cm->verbose_high()) {
- gclog_or_tty->print_cr("[%u] processing grey object " PTR_FORMAT,
- _worker_id, p2i((void*) obj));
- }
-
- size_t obj_size = obj->size();
- _words_scanned += obj_size;
-
- if (scan) {
- obj->oop_iterate(_cm_oop_closure);
- }
- statsOnly( ++_objs_scanned );
- check_limits();
-}
-
-template void CMTask::process_grey_object<true>(oop);
-template void CMTask::process_grey_object<false>(oop);
-
// Closure for iteration over bitmaps
class CMBitMapClosure : public BitMapClosure {
private:
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.hpp Fri Aug 14 15:08:55 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.hpp Fri Aug 14 19:23:27 2015 +0000
@@ -1126,7 +1126,7 @@
inline void deal_with_reference(oop obj);
// It scans an object and visits its children.
- void scan_object(oop obj) { process_grey_object<true>(obj); }
+ inline void scan_object(oop obj);
// It pushes an object on the local queue.
inline void push(oop obj);
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp Fri Aug 14 15:08:55 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.inline.hpp Fri Aug 14 19:23:27 2015 +0000
@@ -232,6 +232,9 @@
}
}
+// It scans an object and visits its children.
+inline void CMTask::scan_object(oop obj) { process_grey_object<true>(obj); }
+
inline void CMTask::push(oop obj) {
HeapWord* objAddr = (HeapWord*) obj;
assert(_g1h->is_in_g1_reserved(objAddr), "invariant");
@@ -299,6 +302,28 @@
return objAddr < global_finger;
}
+template<bool scan>
+inline void CMTask::process_grey_object(oop obj) {
+ assert(scan || obj->is_typeArray(), "Skipping scan of grey non-typeArray");
+ assert(_nextMarkBitMap->isMarked((HeapWord*) obj), "invariant");
+
+ if (_cm->verbose_high()) {
+ gclog_or_tty->print_cr("[%u] processing grey object " PTR_FORMAT,
+ _worker_id, p2i((void*) obj));
+ }
+
+ size_t obj_size = obj->size();
+ _words_scanned += obj_size;
+
+ if (scan) {
+ obj->oop_iterate(_cm_oop_closure);
+ }
+ statsOnly( ++_objs_scanned );
+ check_limits();
+}
+
+
+
inline void CMTask::make_reference_grey(oop obj, HeapRegion* hr) {
if (_cm->par_mark_and_count(obj, hr, _marked_bytes_array, _card_bm)) {