8042727: nsk/jdb/unwatch/unwatch001 crash in InstanceKlass::methods_do(void (*)(Method*))

Only walk methods in instanceklass if the class is loaded

Reviewed-by: dholmes, fparain
This commit is contained in:
Coleen Phillimore 2014-05-21 14:36:18 -04:00
parent 7f721c111b
commit ead7a2760b
5 changed files with 17 additions and 2 deletions

View file

@ -120,7 +120,8 @@ void collect_profiled_methods(Method* m) {
}
void print_method_profiling_data() {
if (ProfileInterpreter COMPILER1_PRESENT(|| C1UpdateMethodData)) {
if (ProfileInterpreter COMPILER1_PRESENT(|| C1UpdateMethodData) &&
(PrintMethodData || CompilerOracle::should_print_methods())) {
ResourceMark rm;
HandleMark hm;
collected_profiled_methods = new GrowableArray<Method*>(1024);