8221121: applications/microbenchmarks are encountering crashes in tier5
Reviewed-by: egahlin, dholmes
This commit is contained in:
parent
14ea8f5c59
commit
d2218f73ea
@ -132,10 +132,6 @@ void JfrBuffer::release() {
|
||||
OrderAccess::release_store(&_identity, (const void*)NULL);
|
||||
}
|
||||
|
||||
void JfrBuffer::clear_identity() {
|
||||
_identity = NULL;
|
||||
}
|
||||
|
||||
bool JfrBuffer::acquired_by(const void* id) const {
|
||||
return identity() == id;
|
||||
}
|
||||
|
@ -145,8 +145,6 @@ class JfrBuffer {
|
||||
return _identity;
|
||||
}
|
||||
|
||||
void clear_identity();
|
||||
|
||||
void acquire(const void* id);
|
||||
bool try_acquire(const void* id);
|
||||
bool acquired_by(const void* id) const;
|
||||
|
@ -312,7 +312,11 @@ static JfrAgeNode* get_free_age_node(JfrStorageAgeMspace* age_mspace, Thread* th
|
||||
|
||||
static bool insert_full_age_node(JfrAgeNode* age_node, JfrStorageAgeMspace* age_mspace, Thread* thread) {
|
||||
assert(JfrBuffer_lock->owned_by_self(), "invariant");
|
||||
assert(age_node != NULL, "invariant");
|
||||
assert(age_node->acquired_by_self(), "invariant");
|
||||
assert(age_node->retired_buffer()->retired(), "invariant");
|
||||
age_node->release(); // drop identity claim on age node when inserting to full list
|
||||
assert(age_node->identity() == NULL, "invariant");
|
||||
age_mspace->insert_full_head(age_node);
|
||||
return true;
|
||||
}
|
||||
@ -329,8 +333,8 @@ static bool full_buffer_registration(BufferPtr buffer, JfrStorageAgeMspace* age_
|
||||
return false;
|
||||
}
|
||||
}
|
||||
assert(age_node->acquired_by_self(), "invariant");
|
||||
assert(age_node != NULL, "invariant");
|
||||
assert(age_node->acquired_by_self(), "invariant");
|
||||
age_node->set_retired_buffer(buffer);
|
||||
control.increment_full();
|
||||
return insert_full_age_node(age_node, age_mspace, thread);
|
||||
@ -412,6 +416,7 @@ void JfrStorage::discard_oldest(Thread* thread) {
|
||||
if (oldest_age_node == NULL) {
|
||||
break;
|
||||
}
|
||||
assert(oldest_age_node->identity() == NULL, "invariant");
|
||||
BufferPtr const buffer = oldest_age_node->retired_buffer();
|
||||
assert(buffer->retired(), "invariant");
|
||||
discarded_size += buffer->unflushed_size();
|
||||
@ -423,7 +428,7 @@ void JfrStorage::discard_oldest(Thread* thread) {
|
||||
} else {
|
||||
mspace_release_full(oldest_age_node, _age_mspace);
|
||||
buffer->reinitialize();
|
||||
buffer->release(); // pusb
|
||||
buffer->release(); // publish
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -637,12 +642,12 @@ static void process_age_list(Processor& processor, JfrStorageAgeMspace* age_mspa
|
||||
JfrAgeNode* last = NULL;
|
||||
while (node != NULL) {
|
||||
last = node;
|
||||
assert(node->identity() == NULL, "invariant");
|
||||
BufferPtr const buffer = node->retired_buffer();
|
||||
assert(buffer != NULL, "invariant");
|
||||
assert(buffer->retired(), "invariant");
|
||||
processor.process(buffer);
|
||||
// at this point, buffer is already live or destroyed
|
||||
node->clear_identity();
|
||||
JfrAgeNode* const next = (JfrAgeNode*)node->next();
|
||||
if (node->transient()) {
|
||||
// detach
|
||||
|
Loading…
Reference in New Issue
Block a user