mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8259008: ArithmeticException was thrown at "Monitor Cache Dump" on HSDB
Reviewed-by: dcubed, gziemski, eosterlund, cjplummer, sspitsyn
This commit is contained in:
parent
69ee314b63
commit
6b24e98c42
5 changed files with 149 additions and 75 deletions
|
@ -58,31 +58,6 @@
|
|||
#include "utilities/events.hpp"
|
||||
#include "utilities/preserveException.hpp"
|
||||
|
||||
class MonitorList {
|
||||
ObjectMonitor* volatile _head;
|
||||
volatile size_t _count;
|
||||
volatile size_t _max;
|
||||
|
||||
public:
|
||||
void add(ObjectMonitor* monitor);
|
||||
size_t unlink_deflated(Thread* self, LogStream* ls, elapsedTimer* timer_p,
|
||||
GrowableArray<ObjectMonitor*>* unlinked_list);
|
||||
size_t count() const;
|
||||
size_t max() const;
|
||||
|
||||
class Iterator;
|
||||
Iterator iterator() const;
|
||||
};
|
||||
|
||||
class MonitorList::Iterator {
|
||||
ObjectMonitor* _current;
|
||||
|
||||
public:
|
||||
Iterator(ObjectMonitor* head) : _current(head) {}
|
||||
bool has_next() const { return _current != NULL; }
|
||||
ObjectMonitor* next();
|
||||
};
|
||||
|
||||
void MonitorList::add(ObjectMonitor* m) {
|
||||
ObjectMonitor* head;
|
||||
do {
|
||||
|
@ -240,7 +215,7 @@ void ObjectSynchronizer::initialize() {
|
|||
set_in_use_list_ceiling(AvgMonitorsPerThreadEstimate);
|
||||
}
|
||||
|
||||
static MonitorList _in_use_list;
|
||||
MonitorList ObjectSynchronizer::_in_use_list;
|
||||
// monitors_used_above_threshold() policy is as follows:
|
||||
//
|
||||
// The ratio of the current _in_use_list count to the ceiling is used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue