< prev index next >
src/hotspot/share/gc/shared/taskqueue.hpp
Print this page
rev 50944 : imported patch enable-taskqueue-stats2
rev 50945 : [mq]: 8206453-count-real-steal-attempts
*** 62,72 ****
inline TaskQueueStats() { reset(); }
inline void record_push() { ++_stats[push]; }
inline void record_pop() { ++_stats[pop]; }
inline void record_pop_slow() { record_pop(); ++_stats[pop_slow]; }
! inline void record_steal(bool success);
inline void record_overflow(size_t new_length);
TaskQueueStats & operator +=(const TaskQueueStats & addend);
inline size_t get(StatId id) const { return _stats[id]; }
--- 62,73 ----
inline TaskQueueStats() { reset(); }
inline void record_push() { ++_stats[push]; }
inline void record_pop() { ++_stats[pop]; }
inline void record_pop_slow() { record_pop(); ++_stats[pop_slow]; }
! inline void record_steal_attempt() { ++_stats[steal_attempt]; }
! inline void record_steal() { ++_stats[steal]; }
inline void record_overflow(size_t new_length);
TaskQueueStats & operator +=(const TaskQueueStats & addend);
inline size_t get(StatId id) const { return _stats[id]; }
*** 85,99 ****
private:
size_t _stats[last_stat_id];
static const char * const _names[last_stat_id];
};
- void TaskQueueStats::record_steal(bool success) {
- ++_stats[steal_attempt];
- if (success) ++_stats[steal];
- }
-
void TaskQueueStats::record_overflow(size_t new_len) {
++_stats[overflow];
if (new_len > _stats[overflow_max_len]) _stats[overflow_max_len] = new_len;
}
--- 86,95 ----
*** 362,383 ****
template <MEMFLAGS F> class TaskQueueSetSuperImpl: public CHeapObj<F>, public TaskQueueSetSuper {
};
template<class T, MEMFLAGS F>
class GenericTaskQueueSet: public TaskQueueSetSuperImpl<F> {
private:
uint _n;
T** _queues;
! public:
! typedef typename T::element_type E;
GenericTaskQueueSet(int n);
~GenericTaskQueueSet();
- bool steal_best_of_2(uint queue_num, int* seed, E& t);
-
void register_queue(uint i, T* q);
T* queue(uint n);
// The thread with queue number "queue_num" (and whose random number seed is
--- 358,380 ----
template <MEMFLAGS F> class TaskQueueSetSuperImpl: public CHeapObj<F>, public TaskQueueSetSuper {
};
template<class T, MEMFLAGS F>
class GenericTaskQueueSet: public TaskQueueSetSuperImpl<F> {
+ public:
+ typedef typename T::element_type E;
+
private:
uint _n;
T** _queues;
! bool steal_best_of_2(uint queue_num, int* seed, E& t);
+ public:
GenericTaskQueueSet(int n);
~GenericTaskQueueSet();
void register_queue(uint i, T* q);
T* queue(uint n);
// The thread with queue number "queue_num" (and whose random number seed is
< prev index next >