Mercurial > hg > truffle
diff src/share/vm/utilities/taskqueue.hpp @ 1709:5f429ee79634
6966222: G1: simplify TaskQueue overflow handling
Reviewed-by: tonyp, ysr
author | jcoomes |
---|---|
date | Mon, 09 Aug 2010 05:41:05 -0700 |
parents | a93a9eda13f7 |
children | 8b10f48633dc |
line wrap: on
line diff
--- a/src/share/vm/utilities/taskqueue.hpp Fri Aug 06 10:17:21 2010 -0700 +++ b/src/share/vm/utilities/taskqueue.hpp Mon Aug 09 05:41:05 2010 -0700 @@ -59,15 +59,21 @@ 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]; } inline const size_t* get() const { return _stats; } inline void reset(); + // Print the specified line of the header (does not include a line separator). static void print_header(unsigned int line, outputStream* const stream = tty, unsigned int width = 10); + // Print the statistics (does not include a line separator). void print(outputStream* const stream = tty, unsigned int width = 10) const; + DEBUG_ONLY(void verify() const;) + private: size_t _stats[last_stat_id]; static const char * const _names[last_stat_id];