8278987: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in __write_sample_info__
Reviewed-by: jbachorik
This commit is contained in:
parent
734143918d
commit
713fbeb050
@ -202,7 +202,7 @@ static void prepare_for_resolution() {
|
||||
|
||||
static bool stack_trace_precondition(const ObjectSample* sample) {
|
||||
assert(sample != NULL, "invariant");
|
||||
return sample->has_stack_trace_id() && !sample->is_dead() && !sample->stacktrace().valid();
|
||||
return sample->has_stack_trace_id() && !sample->is_dead();
|
||||
}
|
||||
|
||||
class StackTraceBlobInstaller {
|
||||
@ -249,7 +249,7 @@ void StackTraceBlobInstaller::install(ObjectSample* sample) {
|
||||
writer.write_type(TYPE_STACKTRACE);
|
||||
writer.write_count(1);
|
||||
ObjectSampleCheckpoint::write_stacktrace(stack_trace, writer);
|
||||
blob = writer.move();
|
||||
blob = writer.copy();
|
||||
_cache.put(sample, blob);
|
||||
sample->set_stacktrace(blob);
|
||||
}
|
||||
@ -278,7 +278,7 @@ void ObjectSampleCheckpoint::on_rotation(const ObjectSampler* sampler) {
|
||||
}
|
||||
|
||||
static bool is_klass_unloaded(traceid klass_id) {
|
||||
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
|
||||
assert(ClassLoaderDataGraph_lock->owned_by_self(), "invariant");
|
||||
return JfrKlassUnloading::is_unloaded(klass_id);
|
||||
}
|
||||
|
||||
@ -381,12 +381,6 @@ void ObjectSampleCheckpoint::write(const ObjectSampler* sampler, EdgeStore* edge
|
||||
assert(sampler != NULL, "invariant");
|
||||
assert(edge_store != NULL, "invariant");
|
||||
assert(thread != NULL, "invariant");
|
||||
{
|
||||
// First install stacktrace blobs for the most recently added candidates.
|
||||
MutexLocker lock(SafepointSynchronize::is_at_safepoint() ? nullptr : ClassLoaderDataGraph_lock);
|
||||
// the lock is needed to ensure the unload lists do not grow in the middle of inspection.
|
||||
install_stack_traces(sampler);
|
||||
}
|
||||
write_sample_blobs(sampler, emit_all, thread);
|
||||
// write reference chains
|
||||
if (!edge_store->is_empty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user