1148 void ciEnv::record_out_of_memory_failure() { |
1148 void ciEnv::record_out_of_memory_failure() { |
1149 // If memory is low, we stop compiling methods. |
1149 // If memory is low, we stop compiling methods. |
1150 record_method_not_compilable("out of memory"); |
1150 record_method_not_compilable("out of memory"); |
1151 } |
1151 } |
1152 |
1152 |
1153 fileStream* ciEnv::_replay_data_stream = NULL; |
1153 void ciEnv::dump_replay_data(outputStream* out) { |
1154 |
|
1155 void ciEnv::dump_replay_data() { |
|
1156 VM_ENTRY_MARK; |
1154 VM_ENTRY_MARK; |
1157 MutexLocker ml(Compile_lock); |
1155 MutexLocker ml(Compile_lock); |
1158 if (_replay_data_stream == NULL) { |
|
1159 _replay_data_stream = new (ResourceObj::C_HEAP, mtCompiler) fileStream(ReplayDataFile); |
|
1160 if (_replay_data_stream == NULL) { |
|
1161 fatal(err_msg("Can't open %s for replay data", ReplayDataFile)); |
|
1162 } |
|
1163 } |
|
1164 dump_replay_data(_replay_data_stream); |
|
1165 } |
|
1166 |
|
1167 |
|
1168 void ciEnv::dump_replay_data(outputStream* out) { |
|
1169 ASSERT_IN_VM; |
|
1170 ResourceMark rm; |
1156 ResourceMark rm; |
1171 #if INCLUDE_JVMTI |
1157 #if INCLUDE_JVMTI |
1172 out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables); |
1158 out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables); |
1173 out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint); |
1159 out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint); |
1174 out->print_cr("JvmtiExport can_post_on_exceptions %d", _jvmti_can_post_on_exceptions); |
1160 out->print_cr("JvmtiExport can_post_on_exceptions %d", _jvmti_can_post_on_exceptions); |
1177 GrowableArray<ciMetadata*>* objects = _factory->get_ci_metadata(); |
1163 GrowableArray<ciMetadata*>* objects = _factory->get_ci_metadata(); |
1178 out->print_cr("# %d ciObject found", objects->length()); |
1164 out->print_cr("# %d ciObject found", objects->length()); |
1179 for (int i = 0; i < objects->length(); i++) { |
1165 for (int i = 0; i < objects->length(); i++) { |
1180 objects->at(i)->dump_replay_data(out); |
1166 objects->at(i)->dump_replay_data(out); |
1181 } |
1167 } |
1182 Method* method = task()->method(); |
1168 CompileTask* task = this->task(); |
1183 int entry_bci = task()->osr_bci(); |
1169 Method* method = task->method(); |
|
1170 int entry_bci = task->osr_bci(); |
|
1171 int comp_level = task->comp_level(); |
1184 // Klass holder = method->method_holder(); |
1172 // Klass holder = method->method_holder(); |
1185 out->print_cr("compile %s %s %s %d", |
1173 out->print_cr("compile %s %s %s %d %d", |
1186 method->klass_name()->as_quoted_ascii(), |
1174 method->klass_name()->as_quoted_ascii(), |
1187 method->name()->as_quoted_ascii(), |
1175 method->name()->as_quoted_ascii(), |
1188 method->signature()->as_quoted_ascii(), |
1176 method->signature()->as_quoted_ascii(), |
1189 entry_bci); |
1177 entry_bci, comp_level); |
1190 out->flush(); |
1178 out->flush(); |
1191 } |
1179 } |