mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8024943: ciReplay: fails to dump replay data during safepointing
Reviewed-by: kvn, twisti
This commit is contained in:
parent
9cb5f396ae
commit
9edb09d8fb
6 changed files with 15 additions and 7 deletions
|
@ -1154,9 +1154,12 @@ ciInstance* ciEnv::unloaded_ciinstance() {
|
||||||
GUARDED_VM_ENTRY(return _factory->get_unloaded_object_constant();)
|
GUARDED_VM_ENTRY(return _factory->get_unloaded_object_constant();)
|
||||||
}
|
}
|
||||||
|
|
||||||
void ciEnv::dump_replay_data(outputStream* out) {
|
// ------------------------------------------------------------------
|
||||||
VM_ENTRY_MARK;
|
// ciEnv::dump_replay_data*
|
||||||
MutexLocker ml(Compile_lock);
|
|
||||||
|
// Don't change thread state and acquire any locks.
|
||||||
|
// Safe to call from VM error reporter.
|
||||||
|
void ciEnv::dump_replay_data_unsafe(outputStream* out) {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
#if INCLUDE_JVMTI
|
#if INCLUDE_JVMTI
|
||||||
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
|
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
|
||||||
|
@ -1181,3 +1184,10 @@ void ciEnv::dump_replay_data(outputStream* out) {
|
||||||
entry_bci, comp_level);
|
entry_bci, comp_level);
|
||||||
out->flush();
|
out->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ciEnv::dump_replay_data(outputStream* out) {
|
||||||
|
GUARDED_VM_ENTRY(
|
||||||
|
MutexLocker ml(Compile_lock);
|
||||||
|
dump_replay_data_unsafe(out);
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
@ -452,6 +452,7 @@ public:
|
||||||
|
|
||||||
// Dump the compilation replay data for the ciEnv to the stream.
|
// Dump the compilation replay data for the ciEnv to the stream.
|
||||||
void dump_replay_data(outputStream* out);
|
void dump_replay_data(outputStream* out);
|
||||||
|
void dump_replay_data_unsafe(outputStream* out);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_CI_CIENV_HPP
|
#endif // SHARE_VM_CI_CIENV_HPP
|
||||||
|
|
|
@ -671,7 +671,6 @@ class StaticFinalFieldPrinter : public FieldClosure {
|
||||||
|
|
||||||
|
|
||||||
void ciInstanceKlass::dump_replay_data(outputStream* out) {
|
void ciInstanceKlass::dump_replay_data(outputStream* out) {
|
||||||
ASSERT_IN_VM;
|
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
|
|
||||||
InstanceKlass* ik = get_instanceKlass();
|
InstanceKlass* ik = get_instanceKlass();
|
||||||
|
|
|
@ -1247,7 +1247,6 @@ ciMethodBlocks *ciMethod::get_method_blocks() {
|
||||||
#undef FETCH_FLAG_FROM_VM
|
#undef FETCH_FLAG_FROM_VM
|
||||||
|
|
||||||
void ciMethod::dump_replay_data(outputStream* st) {
|
void ciMethod::dump_replay_data(outputStream* st) {
|
||||||
ASSERT_IN_VM;
|
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
Method* method = get_Method();
|
Method* method = get_Method();
|
||||||
MethodCounters* mcs = method->method_counters();
|
MethodCounters* mcs = method->method_counters();
|
||||||
|
|
|
@ -373,7 +373,6 @@ void ciMethodData::print_impl(outputStream* st) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ciMethodData::dump_replay_data(outputStream* out) {
|
void ciMethodData::dump_replay_data(outputStream* out) {
|
||||||
ASSERT_IN_VM;
|
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
MethodData* mdo = get_MethodData();
|
MethodData* mdo = get_MethodData();
|
||||||
Method* method = mdo->method();
|
Method* method = mdo->method();
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ void VMError::report_and_die() {
|
||||||
FILE* replay_data_file = os::open(fd, "w");
|
FILE* replay_data_file = os::open(fd, "w");
|
||||||
if (replay_data_file != NULL) {
|
if (replay_data_file != NULL) {
|
||||||
fileStream replay_data_stream(replay_data_file, /*need_close=*/true);
|
fileStream replay_data_stream(replay_data_file, /*need_close=*/true);
|
||||||
env->dump_replay_data(&replay_data_stream);
|
env->dump_replay_data_unsafe(&replay_data_stream);
|
||||||
out.print_raw("#\n# Compiler replay data is saved as:\n# ");
|
out.print_raw("#\n# Compiler replay data is saved as:\n# ");
|
||||||
out.print_raw_cr(buffer);
|
out.print_raw_cr(buffer);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue