# HG changeset patch # Parent 85a04e78cccca5fa40dbff6fb84b22157d40c151 # User tschatzl diff -r 85a04e78cccc src/share/vm/gc/shared/taskqueue.cpp --- a/src/share/vm/gc/shared/taskqueue.cpp Tue Mar 22 14:41:24 2016 +0100 +++ b/src/share/vm/gc/shared/taskqueue.cpp Tue Mar 22 14:45:07 2016 +0100 @@ -40,7 +40,7 @@ #if TASKQUEUE_STATS const char * const TaskQueueStats::_names[last_stat_id] = { - "qpush", "qpop", "qpop-s", "qattempt", "qsteal", "opush", "omax" + "qpush", "qpop", "qpop-s", "qattempt", "qsteal", "opush", "omax", "snotfull", "sempty" }; TaskQueueStats & TaskQueueStats::operator +=(const TaskQueueStats & addend) diff -r 85a04e78cccc src/share/vm/gc/shared/taskqueue.hpp --- a/src/share/vm/gc/shared/taskqueue.hpp Tue Mar 22 14:41:24 2016 +0100 +++ b/src/share/vm/gc/shared/taskqueue.hpp Tue Mar 22 14:45:07 2016 +0100 @@ -55,6 +55,8 @@ steal, // number of taskqueue steals overflow, // number of overflow pushes overflow_max_len, // max length of overflow stack + overflow_pop_shared_notfull, + overflow_pop_shared_empty, last_stat_id }; @@ -66,6 +68,8 @@ inline void record_pop_slow() { record_pop(); ++_stats[pop_slow]; } inline void record_steal(bool success); inline void record_overflow(size_t new_length); + inline void record_shared_empty() { ++_stats[overflow_pop_shared_empty]; } + inline void record_shared_notfull() { ++_stats[overflow_pop_shared_notfull]; } TaskQueueStats & operator +=(const TaskQueueStats & addend); diff -r 85a04e78cccc src/share/vm/gc/shared/taskqueue.inline.hpp --- a/src/share/vm/gc/shared/taskqueue.inline.hpp Tue Mar 22 14:41:24 2016 +0100 +++ b/src/share/vm/gc/shared/taskqueue.inline.hpp Tue Mar 22 14:45:07 2016 +0100 @@ -184,6 +184,13 @@ { if (overflow_empty()) return false; t = overflow_stack()->pop(); + size_t size = taskqueue_t::size(); + if (size == 0) { + taskqueue_t::stats.record_shared_empty(); + } + if (size != taskqueue_t::max_elems()) { + taskqueue_t::stats.record_shared_notfull();; + } return true; }